Once upon a time, there was a man with twelve sons. The eleven eldest were big and strong, but the twelfth, Esben, was small and stayed home with his mother, making him an outcast among his brothers.
When the eleven grew up, they decided to seek their fortune. Their father gave them fine white horses and money, and they rode away without a word to Esben. Undeterred, Esben fashioned a white stick from a branch and followed them.
The brothers came to a house in a great forest, where an old, bearded hag offered them shelter and each one of her daughters for the night. Esben, who had followed secretly, warned his brothers to swap nightcaps with the daughters. At midnight, the witch, unable to see in the dark, beheaded the sleepers wearing the men's nightcaps—her own daughters. Esben woke his brothers, and they fled, forgetting to thank him.
They found work as stablemen at a king's palace, while Esben arrived later and was largely ignored. A wicked knight named Sir Red, angered by the brothers, falsely told the king they could procure marvelous treasures: a dove with alternating gold and silver feathers, a boar with alternating gold and silver bristles, a lamp that could shine over seven kingdoms, and finally, a beautiful coverlet that sounded over eight kingdoms when touched. Each time, the king threatened the brothers with death if they failed.
Each time, Esben came to their rescue. Using his magic stick and clever tricks—peas for the dove, malt for the boar, salt to trick the witch's daughter into fetching the lamp, and finally outwitting the witch and her last daughter to steal the coverlet—he obtained each treasure. The witch chased him each time, shouting accusations, to which Esben cheerfully admitted, "Ye--e--s!"
After securing the final treasure, the witch exploded into flint stones in her fury. Esben returned to the palace just in time to save his brothers from execution. He revealed Sir Red's treachery. The knight was hanged, and the brothers were freed, finally thanking Esben. They all returned home rich to their overjoyed father, and Esben was no longer an outcast.