In Coffin Castle, a gloomy fortress on a lonely hill, 13 clocks have stood frozen at ten minutes to five for seven years. The castle belongs to a cold, aggressive Duke who believes he murdered time itself with his sword. He wears gloves at all times, has one eye behind a velvet patch, and limps from self-inflicted injuries in youth. Living with him is his niece, the Princess Saralinda, who is warm in every way the Duke is cold. Saralinda is nearly 21, and the Duke fears "Now" because it might bring a courageous prince to claim her. He sets impossible tasks for suitors and kills many for trivial offenses, including having names that start with X.
A prince disguised as a ragged minstrel arrives in the town below the castle, calling himself Xingu, a dangerous alias because it begins with X. He is actually the youngest son of a powerful king, weary of court life. At the Silver Swan tavern, he hears of Saralinda and the Duke's cruelty. That night, he sings mocking songs about the Duke in the streets. A traveler warns him and points out Whisper, the Duke's spy-in-chief, hiding nearby.
Left alone, the minstrel encounters the Golux, a peculiar little old man with an indescribable hat and wide, astonished eyes. The Golux warns he is unreliable: He makes things up, forgets things, and is on the side of Good only by accident. He devises a ruse exploiting the Duke's fear of witches' spells: The minstrel must claim that killing him will thwart a royal wedding. The Duke's iron guards arrive, arrest the minstrel, and the Golux vanishes.
The next morning, the Duke feeds Whisper to the geese for reporting the minstrel's songs, then interrogates the minstrel. The minstrel delivers the tale, and the Duke, uncertain whether it is true, sets him a task instead of killing him, dubbing him "the prince of Rags and Jingles." Princess Saralinda descends the marble stairs, radiant. Saralinda says only "I wish him well," the sole phrase she can say near the Duke, constrained by a witch's spell. The minstrel breaks his bonds and seizes her hand, but the Duke slashes it away with his swordcane and orders him to the dungeon.
In the dungeon, the Golux reveals the minstrel's true identity: He is Zorn of Zorna, a prince whose father possesses great wealth. The Golux tells Zorn to implore the Duke not to send him for 1,000 jewels, expecting the Duke to demand precisely that. A guard reveals the existence of the Todal, a terrifying creature that sounds like rabbits screaming and smells of old, unopened rooms. It is an agent of the devil, sent to punish evildoers for doing less evil than they should.
The Duke, having discovered Zorn's identity through his spy Hark, gives the Prince not 99 days but 99 hours to find the jewels. When Zorn returns, all 13 clocks must be striking five. If Zorn fails, the Duke will feed him to the Todal. As the Prince leaves, a rose falls at his feet from Saralinda's window.
Outside, the Golux reveals the Duke unknowingly hired him as his invisible spy, Listen. The Golux remembers Hagga, a woman granted the ability to weep jewels by King Gwain of Yarrow. Hagga has since lost the ability to weep. The rose's stem points the way to Hagga's hill.
They arrive at Hagga's hut with little time to spare. The Golux tells sorrowful tales, but her eyes remain dry. The Prince discovers a chest of jewels wept by Hagga 14 days ago when she laughed in her sleep. These jewels of laughter dissolve after a fortnight, and as they watch, the gems melt with a sound like sighing. King Gwain had amended the gift: Jewels of sorrow last forever, but jewels of laughter fade after two weeks.
The Golux resolves to make Hagga laugh until she weeps. Their comic verses produce only lesser gems. Then Hagga begins laughing spontaneously, and precious diamonds and rubies pour down her cheeks until the hut is ankle-deep in gems. The Golux fills a velvet sack with 1,000 gems, and they depart. The problem of the frozen clocks remains unsolved. The Prince unknowingly drops the rose.
Back at the castle, the Duke reveals the truth about Saralinda: She is not his niece. He stole her as an infant from a king's castle on a storm-swept island. Her nurse, a witch, cursed the Duke: He cannot wed Saralinda until she turns 21, which is the following day, and must grant any prince the right to seek her hand. The spell contains a loophole: "She can be saved, and you destroyed, only by a prince whose name begins with X and doesn't" (102). Hark points out that Zorn, who posed as a minstrel named Xingu, fits this condition. Enraged, the Duke calls the guards from their posts guarding the clocks to find and kill Zorn.
With the Duke and guards gone, the Golux and Saralinda enter the oak room through a secret door. When Saralinda's touch fails to start the clocks, the Golux reasons that holding her hand at precisely the right distance will. Saralinda finds the correct distance, and the frozen works begin to whir. She restarts each clock in turn. Something like a vulture departs, the old frozen time leaving the castle. Saralinda cries, "It's Now!" as morning light fills the windows. Meanwhile, Zorn fights the guards and Krang, the Duke's finest fencer.
When the Duke stumbles back into the oak room, the clocks strike five and 1,000 jewels gleam on the table. Zorn reveals he locked the guards in a tower and tied Krang in knots. Hark reveals himself as a servant of Saralinda's true father, King Gwain of Yarrow. The Duke insists on counting the jewels, vowing to wed Saralinda if even one is missing. He counts to 999 and finds the table bare. The Golux turns pale, certain a gem slipped from the sack during the journey. The Duke gloats, but a diamond falls from his own left glove, bringing the total to 1,000. Only the Golux sees it fall. Defeated, the Duke orders them to leave.
Outside, the Golux presents two white horses and reports a ship waits in the harbor. Hark explains he must remain a fortnight, bound by a spell. The Golux advises the Prince and Princess: "Keep warm. Ride close together. Remember laughter. You'll need it even in the blessed isles of Ever After" (120). The Golux vanishes before anyone can say goodbye. The Prince and Princess ride to the harbor, where a fair wind stands for Yarrow.
A fortnight later, the Duke's jewels dissolve into tears, as jewels of laughter always do. He draws his sword and calls for Whisper, forgetting he fed Whisper to the geese. Then the Todal arrives. The torches go out, the room grows cold, and the air fills with the smell of old unopened rooms and the sound of rabbits screaming. There is a stifled shriek, then silence. When Hark enters with a lantern, the room is empty. The Duke's sword lies on the floor, and Hagga's dissolved jewels drip from the table. Alone in the gloomy castle, the last spy of Coffin Castle thinks he hears, from far away, the sound of someone laughing.