Yannis essentially answers the question here, but I'll add a little detail, just for fun, using poetry (since the deepest insights come from great poets) and linguistics.
T.S. Eliot writes about this very specifically:
The dove descending breaks the air
With flame of incandescent terror
Of which the tongues declare
The one dischage from sin and error.
The only hope, or else despair
Lies in the choice of pyre of pyre-
To be redeemed from fire by fire.
Who then devised the torment? Love.
Love is the unfamiliar Name
Behind the hands that wove
The intolerable shirt of flame
Which human power cannot remove.
We only live, only suspire
Consumed by either fire or fire.
The Ancient Greek word for fire is "pur" (πῦρ) from which we derive pyre and purify.
In the Four Quartets and other works, Eliot connects these ideas from the Upanishads, through Greek Mythology and into Christian lore. Fire, is, of course, very important in Hindu mythology, and the Christian conception of love as agape grows out of ancient Greek explorations of the deeper meaning of love beyond eros. Eliot purposely conflates eros and agape in this poem.
It is the romantic jealousy of Nessus that "weaves" the poison shirt, Deianira's love for her husband that brings it to him, but in the Christian conception, it is love that redeems us from the inextricable suffering of existence.
It's not clear that Heracles can die--part of his myth is his defeat of death (Alcestis), and his travel to and return from the underworld. Jumping off a cliff or opening his veins or falling on his sword may not have worked.
But by burning himself alive, he experiences suffering so excruciating that Zeus takes pity of him and releases him from the mortal coil.
Pity was a very important concept to the Greeks. It humanizes, as in the death of Hector, breaker of horses. It was deeply religious, in that catharsis was the intent of Greek drama.
The purification and burning away of the mortal flesh can be said to be the foremost meaning, but pity is the key.
Heracles' agony is what gets Hera to relent, according to Ovid:
“Come Juno, feast upon my death;
feast on me, cruel one, look down from your
exalted seat; behold my dreadful end
and glut your savage heart! Oh, if I may
deserve some pity from my enemy,
from you I mean, this hateful life of mine
take from me—sick with cruel suffering
and only born for toil. The loss of life
will be a boon to me, and surely is
a fitting boon, such as stepmothers give!"
[Metamorphoses, Book IX]
Later in the section:
The Gods felt fear
for earth's defender and their sympathy
gave pleasure to Saturnian Jove
[Metamorphoses, Book IX]
And all the gods, including Hera, acquiesce to Heracles deification and release from suffering.
It is worth noting that Eliot concludes the Four Quartets with:
And all shall be well and
All manner of thing shall be well
When the tongues of flame are in-folded
Into the crowned knot of fire
And the fire and the rose are one.
ON THE DOVE: The dove is a symbol that has many connotations, particularly in the wider scope of Eliot's poem. The dove is generally associated with Aphrodite (love) but there is evidence of association with Hera also. (Doves are monogamous during mating season, and monogamy is the domain of Hera.)
“…it is significant that the dove was one of Hera’s sacred birds. Doves were found in association with her temples at Argos and Delos, and related stature even depicts Hera with wings. (O’Brien 1993, 73;178, fig. 22; 227-31) This iconography and Homer’s characterization of her in the Iliad (5.778-9) as one who moved ‘like a quivering dove” suggest that one of Hera’s early epiphanies may have been as a dove.”
[Source: The Cult of Divine Birth In Ancient Greece, Rigoglioso, M. 2009, p.129]
An in-depth discussion on the etymology of Hera may be found in The Transformation of Hera: A Study of Ritual, Hero, and the Goddess in the Iliad by Joan V. O'Brien, Professor of Classics at Southern Illinois University, Carbondale. The book references the association of Hera with the dove including pp.48, 114, 195, 228, 230, and most notably on page 207: “In the search for submerged images of God, those of the early Hera offer some interesting possibilities: a Soaring Dove bringing birth and death…” On pp.186-187 O'Brien also links Hera and Aphrodite.
I believe there is also a credible hypothesis that Hera could be a feminine form of the masculine Eros, although I am having difficultly tracking that down at the moment. (When I find an academic reference I will amend.)