Most magical swords in the game either have a special name, like the frost brand, nine lives stealer, defender or holy avenger, or they follow a naming pattern of "Sword of X", for example sword of sharpness, sword of wounding, or sword of life stealing.
The only exceptions to this in the core rules are the vorpal sword and the dancing sword. The vorpal sword got its name from a poem, and this makes me suspect that the dancing sword might also have some literary root. Is the origin of this weapon and how it made it into the game known?
NOTE: It is not sufficient to show that the idea of a self-wielding sword predates D&D, you need to show evidence indicating that D&D's dancing sword was specifically inspired by the predating sword. If you can't show that evidence then do not answer.