Sophie and Josh Newman are 15 year-old twins who are working at their summer jobs in The Coffee Cup in San Francisco (Josh works at the book store where John Dee enters, Sophie works at The Coffee Cup) when a mysterious man, John Dee, comes into the book store right next to them for a book, the Codex – or Book of Abraham the Mage. Josh witness both Nick and Perry using magic. They discover that Nick is not an ordinary bookseller, but is the medieval and the legendary alchemyst, Nicholas Flamel, being kept alive by making the elixir of life (a secret from the Codex) for him and his wife, Perry (Perenelle). Dee also uses magic and takes the Codex by force while Josh is holding it – resulting in two pages being left behind “The Summoning” pages that Dee needs to raise the Dark Elders. Both Flamels need the Codex to make the elixir of life, or they will age rapidly and die within a month. Also, if they do not retrieve the Codex, Dee will summon the Dark Elders to destroy the world and return to an age in which humans are but slaves and food.
Flamel quickly takes them to a hideout to enlist the aid of Scathach, a powerful Next Generation Elder. There, they are forced to run, threatened by rats sent by Dee, which are thwarted by Flamel and Scathach. Chased again almost immediately by tens of thousands of birds, Flamel then leads the twins and Scathach to secure the aid of Hekate, an powerful three-faced Elder, who can awaken the twins’ magical potential. Dee discovers this, and enlists the aid of Bastet and the Morrigan. The trio mount a massive assault on Hekate’s shadowrealm, to destroy Yggdrasill – the world tree – that is the heart of Hekate’s power.
While Yggdrasill is attacked, Hekate awakens Sophie’s magic abilities, but does not have time to awaken Josh, as the tree has been set on fire by Dee. While she rushes to defend her home, Scathach, Flamel, and the twins attempt to escape the shadowrealm. While escaping, they encounter Dee, and witness the power of the ancient Ice Elemental sword, Excalibur. They see Dee transform a wereboar into pure ice, then shatter the statue. Scathach remarks that she thought that Excalibur had been lost when Artorius died.
The twins, Scathach, and Flamel escape the shadowrealm, shortly before the destruction of Hekate, Yggdrasill, and the entire shadowrealm. As they escape, Dee uses Excalibur to freeze the tree, and Hekate, whose life and power is linked to it, transforms to ice as well. As this occurs, Dee is informed that the Flamels and Scathach have escaped with the twins. In his rage, he shatters Yggdrasill, which crushes Hekate into dust, killing her. Flamel, Scathach, and the twins travel to Scathach’s grandmother, the Witch of Endor (also called “The Mistress of Air”), who teaches Sophie her magical secrets quickly by giving the girl all the witch’s knowledge and the power to know how to use air magic.
While they are there, Dee has found out that a prophecy in the Codex speaks of Sophie and Josh. He tempts Josh to join him, while using necromancy to raise thousands of corpses to assault the Elders, Flamel, and Sophie. Josh almost agrees, but at the last moment he realizes he will lose Sophie if he agrees. Dee brings all the dead in a nearby cemetery alive and they start to attack them, Josh hits Dee with a Hummer distracting Dee long enough to escape with Scathach, Sophie and Nicholas Flamel by using a leygate (a teleportation device where two or more lines of energy, ley lines, cross the world) to go to Paris which is Nicholas Flamel’s old home. The book ends when Dee arrives.