Rumpelstiltskin is a character in a story/fable written by the Brothers Grimm. A miller desperately wants his daughter to marry the king and tells the king his daughter is able to spin straw into gold (on a spinning wheel). The king is intrigued (and greedy), so he invites the girl to his palace and locks her up for the night, expecting to see his straw turned into gold in the morning. If she cannot perform this task, he will have her killed.
The girl is quite distraught, for of course she does not know how to spin straw into gold. A "little man" appears and offers to help her if she gives him something in return. She offers him her necklace, and the wizened little man does as he promised.
The king is pleased at what he sees, but his greed prompts him to make more demands of the girl. She is placed in a bigger room with more straw, and she is again afraid for her life because she is unable to do what the king wants. The little man appears again and demands something more to do her spinning; she gives him her ring and he does the job for her.
Again the king wants more, but this time he promises that the girl will become his wife if she accomplishes the task. The little man appears again, but the girl has nothing more to offer him. He quickly suggests that she give him her firstborn child if she ever becomes queen; this seems like a reasonable trade, since she has no idea if she will ever marry the king, so she agrees.
A year later, after the queen's child is born, the little man returns to collect on her promise. She is horrified at the idea and he pities her, so he makes her a deal: she has three days in which to discover his name or give him her child.
After two days of guessing, she still does not know the man's name. On the third day, a messenger arrives and mentions something he heard; "quite a ridiculous little man was jumping" on one foot in the forest and chanting a song:
"To-day I bake, to-morrow brew,
the next I'll have the young queen's child.
Ha, glad am I that no one knew
that Rumpelstiltskin I am styled."
When the queen tells the man his name, Rumpelstiltskin stomps his right leg so hard that he gets his entire leg stuck deep in the floor. In his "rage he pulled at his left leg so hard with both hands that he tore himself in two."
Other works, such as George Orwell's 1984, use allusions to Rumpelstiltskin to mean a trickster who tries to gain power and control without any fear of being discovered or caught.