As poetic as it sounds, this is a myth. No species of swan sings when it dies.
There has long been a legend that the European Mute Swan is completely silent throughout its lifetime, only to sing one glorious and beautiful song just before it dies. This is not true. Not only does the Mute Swan not sing when it dies, but its name is also misleading. The bird is not completely silent (although Mute Swans are far less vocal than other varieties of swans, like Europe's Black Swan or Whooshing Swan, or North America's Trumpeter Swan).
The phrase "swan song" refers to the final act or performance by a creative person, such as a musician or actor, usually shortly before the person either retires or dies. Obviously, this metaphoric phrase originated from the myth of the Mute Swan. But although the meaning of the phrase is well-accepted and documented, people have known for centuries that the Mute Swan does not sing to meet its death.