The novel is set in the fictional world of Osten Ard. At its center stands the Hayholt, a vast castle built on the ruins of Asu'a, an ancient stronghold of the Sithi, a near-immortal, elflike people driven from their lands centuries ago by human invaders. As the story opens, King John Presbyter, called Prester John, the High King who united Osten Ard's human nations, is dying. Simon, a fourteen-year-old orphaned scullion raised by chambermaids, spends his days dodging chores assigned by Rachel the Dragon, the stern Mistress of Chambermaids. The king sits one last time on the Dragonbone Chair, a throne carved from dragon bones, and entrusts his jester Towser with the royal sword Bright-Nail, to be passed to his elder son Elias.
Simon begins an apprenticeship with Doctor Morgenes, the castle's eccentric physician, who introduces him to the Hayholt's deep history and Sithi origins. Simon overhears Elias and his younger brother Josua arguing in the chapel. Josua warns Elias against the priest Pryrates, a hairless and sinister figure, but Elias dismisses the warning and accuses Josua of bearing responsibility for the death of Elias' wife Hylissa.
King John dies, and Elias ascends to the throne. His reign brings mounting hardship: drought, rising taxes, and the growing influence of Pryrates, who becomes the king's chief advisor. Morgenes warns Simon that Pryrates opens dangerous doors without caring what comes through. Secretly, Morgenes receives a message from the League of the Scroll, a small society of scholars, warning that the Norns, a pale offshoot of the Sithi dwelling in the northern fortress of Stormspike, are stirring again.
Simon discovers a hidden passage beneath the castle and finds Prince Josua chained in a dungeon, emaciated and near death. With Morgenes' help, he frees the prince and sends him toward his northern stronghold of Naglimund. Their conspiracy is betrayed by Inch, Morgenes' resentful former assistant. When Erkynguard soldiers, the king's guard, arrive with Pryrates, Morgenes gives Simon a manuscript and pushes him into an escape tunnel, then immolates himself in alchemical fire to block pursuit.
Simon flees through tunnels beneath the Hayholt and emerges outside the town of Erchester. On Thisterborg hill, he witnesses a secret ceremony: Elias and Pryrates meet hooded Norns who deliver the gray sword Sorrow, forged by the Sithi prince Ineluki. Pryrates sacrifices a nobleman, and Elias takes the sword, pledging allegiance to Ineluki, known as the Storm King. A vast, horrifying shape manifests above the gathering, and Simon flees in terror.
Alone and starving, Simon heads north into Aldheorte Forest. He rescues a Sitha trapped in a snare, killing the woodsman who set it. The Sitha shoots a white arrow into a tree beside Simon, marking a sacred debt, and vanishes. Simon then meets Binabik, a troll from the mountain people of Yiqanuc who rides a gray wolf named Qantaqa. Binabik reveals that his master Ookequk, a League of the Scroll member, died while walking the dream-road, a form of magical travel, after Morgenes asked him to protect Simon and guide him to Naglimund. Binabik took on the duty himself. They arrive at Saint Hoderund's monastery to find it destroyed and the monks slaughtered.
Simon is captured by Duke Isgrimnur of Elvritshalla and his Rimmersmen but survives interrogation. That night, Bukken, small vicious creatures, erupt from the earth and attack the camp. Binabik rescues Simon, and the two flee eastward, pursued by unnatural white hounds bearing both the brand of Stormspike and collars from Elias' kennels, led by Ingen Jegger, a huntsman serving Elias. They rescue a girl calling herself Marya, who claims to carry a message for Josua from Princess Miriamele, Elias' daughter. They reach the cottage of Geloë, a wise woman of great power, who leads them on a magical journey along the Road of Dreams, where they glimpse armies preparing for war and silhouettes of three swords.
The companions escape through the forest and travel down the river Aelfwent, passing through the ruins of the abandoned Sithi city Da'ai Chikiza. Ingen's archers wound Binabik. Simon carries the unconscious troll up the Stile, an ancient road through the Wealdhelm Hills. Near the summit, Ingen's forces and a Hunën, a towering ice giant, close in. Prince Josua and his knights arrive, rescuing the party. Simon collapses and is carried through the gates of Naglimund.
At Naglimund, Simon recovers and begins combat training. Josua convenes a council where Jarnauga, an aged League of the Scroll member who has watched Stormspike for decades from his home in Tungoldyr, reveals the history of the Storm King. Centuries ago, Ineluki forged the sword Sorrow from witchwood poisoned with iron, killing his own father. When Asu'a fell to human invaders, Ineluki and his five followers, the Red Hand, unleashed a catastrophic spell that destroyed their physical forms but preserved Ineluki's consciousness as a being of pure hatred. His spirit reached the Norns, and he became the Storm King. Simon, overwhelmed by returning memories of Thisterborg, shouts that he saw the sword delivered to Elias and collapses.
Josua introduces Princess Miriamele, Elias' daughter who has fled the Hayholt. Simon discovers she is Marya and storms from the hall, feeling betrayed. Working from Morgenes' manuscript, Binabik and Father Strangyeard, the castle archivist, uncover a prophecy by the ancient sage Nisses: When ancient evils rise, three swords must come again. The swords are Sorrow, in Elias' hands; Thorn, the legendary black blade of the knight Camaris, believed lost; and Minneyar, an iron sword whose fate is unknown. Josua sends a party north to find Thorn, including Binabik, Simon, and several soldiers.
Near the mountain Urmsheim, the party is ambushed by forces loyal to Skali Sharp-nose, Elias' northern ally. Sithi warriors intervene and bring the survivors to a hidden lodge, where Simon finds Prince Jiriki, the very Sitha he rescued. Jiriki acknowledges his life-debt and joins the quest. The company ascends Urmsheim and discovers the Uduntree, a massive frozen waterfall. In a cave at its base they find the skeletons of Colmund's expedition and the sword Thorn, so heavy that two strong men cannot lift it. Simon, however, picks it up easily, as though the blade allows him to carry it.
Ingen Jegger's huntsmen attack, rupturing the ice. The dragon Igjarjuk, a vast white-furred creature, erupts from below. Simon faces the dragon with Thorn and strikes at its eye. Igjarjuk plunges over a precipice, drenching Simon in burning black blood that triggers a mystical vision. His consciousness expands across Osten Ard, and he sees Morgenes' ghost warning of a "false messenger."
At Naglimund, the war reaches its climax. Benigaris, son of the Nabbanai Duke Leobardis, stabs his own father during battle, scattering the duke's allied army. The Norns arrive within a supernatural storm. Five beings of the Red Hand destroy the castle gate with sorcerous fire, and Naglimund falls. Josua escapes through a hidden tunnel with a handful of survivors, including his companion Vorzheva, Duke Isgrimnur's wife Duchess Gutrun and son Isorn, Josua's knight Deornoth, and Father Strangyeard. Jarnauga sacrifices himself to seal the passage. Standing above the burning ruins, Josua vows to take the crown from his brother.
Simon awakens on Mintahoq, the troll-mountain. Two companions are dead; Binabik and Sludig, the party's Rimmersman soldier, have been taken prisoner by the troll-king. When Simon looks into Jiriki's mirror, he sees a stranger: A long scar runs from his jaw past his left eye, and a stripe of his hair has turned white from the dragon's blood. Jiriki names him "Seoman Snowlock." The novel ends with Simon covering his changed face, the quest's first sword secured but his companions scattered, imprisoned, or dead, and the war for Osten Ard only beginning.