Once upon a time, a poor miller had a beautiful daughter. To impress the King, he boasted that she could spin straw into gold. Intrigued, the King summoned the girl and locked her in a room full of straw, demanding she spin it into gold by morning or face death.
Desperate and weeping, the girl was visited by a tiny man. He offered to spin the straw for a price: first her necklace, then her ring. The King, greedy for more gold, gave her larger rooms each night. On the third night, with nothing left to give, the girl promised the little man her firstborn child if he would help her. He agreed, and she succeeded, becoming the King's wife.
A year later, the Queen bore a son. The little man returned to claim his prize. Distraught, the Queen offered all her riches, but he refused, desiring only the child. Taking pity, he gave her three days to guess his name; if she succeeded, she could keep her child.
The Queen sent messengers far and wide to collect unusual names. For two days, she guessed names like Kasper and Spindleshanks, but failed. On the third day, a messenger reported seeing a strange little man dancing by a fire, singing a rhyme that revealed his name: Rumpelstiltskin.
When the little man returned, the Queen pretended to guess wrong names before triumphantly declaring, "Is your name perhaps, Rumpelstiltskin?" Enraged, he screamed, "Some demon has told you that!" In his fury, he stamped his foot so hard it sank into the ground, then tore himself in two.