When King Derwin's carriage rolls into town, Bartholomew Cubbins respectfully removes his hat along with everyone else. But another hat appears upon the boy's head -- and another, and another, and another. Furious, King Derwin orders Bartholomew to be brought to the palace. Various royal experts try in vain to get rid of the boy's bewitched headgear, and when Bartholomew receives a death sentence, the friendly executioner explains that it's unlawful to behead people with their hats on.
The king's nasty young nephew offers to push Bartholomew from the highest turret, and on the way upstairs the hats -- which Bartholomew keeps removing -- grow fancier and fancier. Derwin is so entranced by hat 500, a plumed, bejeweled dazzler, that he pardons Bartholomew, spanks his nephew, and buys the hat for 500 gold pieces. Once the king lifts his purchase from Bartholomew's head, the boy is relieved to feel breezes ruffling his hair.