Emilia says, “I will play the swan, and die in music.” (Othello, v. 2.)

Swans (Cygninae) are weighty, white long necked birds that live along the shores of rivers and lakes. They dunk their head into the water to feed on the bottom flora and browse grasses along the shores. Swans have a deep ponderous flight and typically fly in V-formation of lines. It’s interesting to note that the names for the three primary swans that live in North America are the Mute Swan (Cygnus olor), Whistling Swan (Olor columbianus)and the Trumpeter Swan(Olor buccinator). While the Whistling and Trumpeting swans are distinguished for their loud and sonorous cry, due to complex convolutions of the windpipe the Mute swan issues a low grunt that is rarely heard, but their wingbeats produce a singing note when they fly. The word swan comes from Sanskrit for sound because the ancients believed their eggs were hatched by thunder and lightning. In Iceland the Cygnus mu’sicus possesses a note that bears a resemblance to the tone of a violin, though a bit higher. Every note is singular and arises after a long pause. This music presages a thaw in Iceland, and consequently one of its great charms.

A swan song today means a farewell appearance, act or statement or a last creative work. So how did this evolve into meaning someone's downfall or final act? “The ancient legend,” says one etymologist,” is that the swan is silent for a lifetime, and only sings once, beautifully, and dies. Beautiful nonsense.”

The relationship between swans and singing stems from Greek legend and according to Plato it's linked with Orpheus and Apollo the god of music. The swan's dying song was one of happiness at the imminence of joining them. The article Because everything has to start somewhere explains:

The first "swan song" can be traced back to the days of Socrates. Specifically, Plato's Phaedo in the 4th century B.C. Condemned to death on charges of immorality and heresy, Socrates welcomed his impending doom because he believed it would draw him closer to a meeting with the god Apollo. The swan was one of Apollo's favored creatures, and men had observed that the swan would cry loudly and long. Socrates believed that swans "having sung all their life long, do then sing more, and more sweetly than ever, rejoicing in the thought that they are about to go away to Apollo, whose ministers they are."
Euripedes, Aristotle, Senaca, and Cicero believed Plato. Other argued against the myth and Pliny refused to believe it at all. One source attributes the legend to the 6th Century fabler Aesop. Chaucer (c. 1374) alludes to the tale twice in his literary work and friend and colleague to Shakespeare, Ben Jonson referenced his comrade in writing as the "the sweet swan of Avon." Shakespeare uses the myth twice in his work and one breathtaking madrigal from the same era compose in 1612 by Orlando Gibbons:
The silver swan, who living had no note,
When death approach'd, unlock'd her silent throat;
Leaning her breast against the reedy shore,
Thus sung her first and last, and sung no more.
Farewell, all joys; O Death, come close mine eyes;
More geese than swans now live, more fools than wise.
Still the phrase swan song doesn’t appear in the English language until 1831 when English author Carlyle translated the German word schwanengesang or schwanenlied and plainly refers to it in his Sartor Resartus where he employs it metaphorically to stand for 'the final work of a person's life.' Finally Random House’s Word of The Day says, Samuel Taylor Coleridge, “ever the wit, commented notably that:
Swans sing before they die; 'twere no bad thing
Did certain persons die before they sing.”

Sources:

A Guide to Field Identification, Birds of North America, Chandler S. Robbins, Bertel Bruun, Herbert S. Zim, Arthur Singer, p 38, 1966.

E. Cobham Brewer 1810–1897. Dictionary of Phrase and Fable. 1898.:
http://www.bartleby.com/81/16104.html

The Maven’s Word of t he Day:
http://www.randomhouse.com/wotd/index.pperl?date=19970808uy87

Online Etymology Dictionary:
www.etymonline.com/index.php?l=s&p=51

Mindless Crap Origins:
www.mindlesscrap.com/origins/more-c.htm

The Phrase Finder:
www.phrases.org.uk/bulletin_board/4/messages/834.html

Word Origin:
http://www.wordorigins.org/wordors.htm