"In the maddening swirl of language, we seldom reflect on the meaning
of individual words or phrases. It is not so surprising then, when we
pass by even more obscure idioms and metaphors, although this
paradoxically does not prevent us from using them again in turn!
One of these phrases is “swan song”, often meaning the last effort or
final production coming from someone in his respective field before
retirement, or sometimes, death. This idea has a long pedigree in
Western thought. It first appears in literature in Aeschylus (Agamemnon,
1444), and has not performed its own swan song in our communal
imagination since. The idea behind the myth was that the swan is silent
its entire life save the prescience it is granted of its oncoming
death, then the swan pours out the first and final charming melodies
from its soul.
Socrates himself alludes to this myth, albeit not without commenting on what he sees as its probable origin:
But I seem to you more common than the swans regarding prophecy, which
when they sense that it necessary that they die, they sing in the
interval before death, indeed, at that time, especially and most
beautifully do they sing, rejoicing that they are about to go to the
divine, the very thing they serve. And men, because of their own fear
of death, they both slander the swans and they say that the swans lament
their death singing because of pain, and they do not consider that no
bird sings when in hunger or cold or during any other pain it undergoes,
nor does the nightingale, the swallow, nor the hoopoe, which they say
laments singing because of its pain. But these do not appear to me to
sing because they are pained, nor do the swans, but I think, since they
are prophetic, being from Apollo, and foreknowing the good things in
Hades they sing and rejoice during that day more than in the time
before. I myself think I am a co-laborer of the swans and a priest of
the same god, and I have the gift of prophecy from my master not worse
than theirs, nor do I think I am freed from a life more melancholy than
theirs. Phaedo 84e-85b"
from http://www.ancientgreekphilosopher.com/.
.