Nineteen-year-old Aelin Galathynius is sole heir to the throne of Terrasen. When the king of Adarlan ordered the death of Aelin’s family, he was under the control of the Valg, monstrous creatures from another dimension. The Valg seek the Wyrdstones, three objects that can open a Wyrdgate allowing the Valg to lead their armies between dimensions and take over Aelin’s world. Aelin has one Wyrdstone. Erawan had two, but one was taken by Elide, a Terrasen noblewoman, who escaped slavery in Erawan’s fortress. Elide now seeks Aelin to give her the second stone.
Aelin defeated the king of Adarlan only to learn that a Valg prince possessed him and that the Valg king, Erawan, was in the body of Duke Perrington, the king’s adviser. Erawan is now strong enough to unleash the monsters he has been breeding. He declares war on the continent of Erilea.
Aelin, along with Fae Prince Rowan, her cousin Aedion and her shape-shifter friend, Lysandra, travel to Terrasen so Aelin can reclaim her throne. Before reaching the capital city, Aelin arranges a meeting with the surviving lords of Terrasen to plan for war with Erawan. To her surprise, they reject her as their ruler due to her age, her past and her romantic relationship with Rowan, whom they do not trust.
During the meeting, the group receives a message that Erawan’s witch armies are flying to Rifthold, Adarlan’s capital city where King Dorian lives. Aelin sends Rowan to rescue Dorian, while she leaves for the coast to gather allies to fight for Terrasen. She tells the lords that while they have rejected her, she will never stop fighting for Terrasen and will return with her army to defend her home. She sends messages to several people, calling in life debts that are owed to her.
Witches attack Rifthold, and Dorian tries to defend it. Erawan had ordered Dorian to be taken alive if possible, but the Yellowlegs have no intention of sparing him. As Dorian is about to be killed by Yellowlegs witches, Manon Blackbeak flies in on her wyvern and kills the rival witches. When Rowan arrives, Manon tells Dorian to leave with him.
Rowan sneaks Dorian out of the city by boat to the pirate port of Skull’s Bay, where they wait on Aelin, Aedion and Lysandra. There they find two of Queen Maeve’s Fae warriors, Gavriel and Fenrys, who have been ordered by Maeve to kill Lorcan.
The warriors tell Rowan that Maeve’s armada is on the way to Erilea. Neither Gavriel nor Fenrys are fond of Maeve, but they have taken a blood oath, which compels them to carry out her orders. They make a deal with Rowan that if they help him fight for Aelin in the oncoming war, Rowan will help them find Lorcan.
When Manon returns to her coven, she lies to her grandmother, the matron of the Blackbeak clan, that she was trying to capture Dorian alive but the Yellowlegs got in the way and she had to kill them. The matron suspects that Manon is lying but cannot prove it, so she orders Asterin, Manon’s cousin and second in command, to be killed as punishment for the Yellowlegs’ death.
Manon frees Asterin and attacks the matron, allowing Asterin and the rest of her witch warriors to flee. During their fight, the matron tells Manon that her father was a Crochan prince, and she is now the last in the royal line, the Crochan queen. Manon is shocked, as the Crochan witches are the greatest enemy of the Ironteeth witches. The matron uses her iron nails to gouge Manon’s stomach before Manon jumps from a ledge and is caught by Abraxos, Manon’s wyvern, and they escape.
Elide escaped Erawan’s fortress, but she is now being hunted by ilken, Erawan’s humanoid monsters. Lorcan, one of Queen Maeve’s Fae warriors, is also in search of the Wyrdstones. He is in love with Maeve and knows she seeks the dangerous power the Wyrdstones offer. Lorcan is determined to find and destroy them for Maeve’s safety. Lorcan meets Elide in the forest and protects her from the ilken. The two form a tentative partnership, but Lorcan doesn’t know that Elide carries one of the stones he seeks.
Aelin travels to a seaside town to visit a temple dedicated to Brannon, her Fae ancestor. Enemy soldiers occupy the town, so Aelin uses fire magic to burn most of them to death. At the temple, she encounters the spirit of the long dead Brannon, who tells her she must find a lock that can trap Erawan. The lock is in an ancient, half drowned city in the county of Eyllwe. Before traveling there, Aelin goes to a pirate port of Skull’s Bay to reunite with Rowan and Dorian.
Aelin wants an alliance with the pirate king, Rolfe, but the two share a contentious past. To force Rolfe’s help, Aelin sends out a pulse of her magic to alert the Valg to her location. Panicked that the Valg will slaughter and imprison his people, Rolfe agrees to align with Aelin.
When the Valg soldiers arrive on ships, Aelin and Rowan combine their magic to defeat them. Aelin makes the mistake of combining her magic with that of the Wyrdstone she wears on a chain and unwittingly summons the goddess Deanna, who tries to destroy both their friends and enemies. When Rowan confronts Deanna, who is using Aelin’s body, she tells him that Aelin must find the lock in the marshes.
Aelin and her friends leave the pirate port and sail for the marshes of Eyllwe. On the way there, Abraxos, flying with a gravely injured Manon on his back, finds the ship. Aelin uses magic to heal Manon, but Erawan’s tracker has followed her to the ship. The creature, along with several ilken, attack Manon, Aelin and the ship’s crew. The monsters are defeated, but Erawan now knows where Aelin is.
Aelin and her friends find the sunken city but, before they can find the lock, Erawan sends an army of ilken to attack. Aelin summons her fire magic to burn the winged monsters from the sky. Elide and Lorcan reach Aelin as she is destroying the monsters.
Elide’s reunion with Aelin is joyous, but Gavriel and Fenrys are compelled by the blood oath to attack Lorcan. Rowan stops the fight with ritual words, stating that it will be an act of war if they continue. They comply but know the words can only temporarily hold off the oath. Rowan notices that Lorcan demeanor is softer. Lorcan is falling in love with Elide.
After eliminating the ilken, Aelin finds an ancient witch mirror where the lock should have been. The group takes the mirror back to the ship and encounter a captain of a fleet ships. At first, it seems the group will be ambushed, but the captain is Ansel, Aelin’s friend who owes her a life debt.
Aelin is aboard Ansel’s ship when Maeve’s armada arrives, but Aelin is weakened from using much of her magic to kill the army of ilken. Maeve demands Aelin’s surrender. Even with war looming, Dorian knows the importance of finding out how to destroy Erawan. He has the idea that both Aelin and Manon, the Queen of Terrasen and Queen of the Crochans, should touch the mirror at the same time. They do and are transported into the past.
Hundreds of years before, Elena, Brannon’s Fae daughter, and her human mate, Gavin, fought Erawan and his armies. Elena tricked her father, Brannon, and stole an amulet (the real lock) from him, which temporarily imprisoned Erawan. She didn’t know that the lock was to be used to banish Erawan back to his realm forever and seal the gate.
The gods were angry with Elena and wanted to kill her and Gavin, but Elena bargained with them and promised to help a magic gifted ancestor in the future to forge a new lock and do what Brannon intended to do. When two children were born with immense magic, Elena chose Aelin, as she thought she was more mature than Dorian.
Aelin had the real lock all along but it has no power left. Elena tells her that forging a new lock and sending Erawan back will require Aelin’s entire lifeforce. Aelin accepts her fate, and she and Manon are bought back to the present, but instead of being on the ship, they are onshore near Maeve, who has a knife to Elide’s throat. Aelin slips the two Wyrdstones into Manon’s pocket and bargains for Elide’s life.
While Aelin and Manon were in the mirror realm, a bloody battle started. Aelin uses her magic to fight but, with so little power left, Maeve overcomes her. Hundreds of years before, Maeve used her magic and foresaw that Aelin would lead her to the Wyrdkeys. So she has been patiently waiting for Aelin to be born.
She manipulated Rowan, Aelin’s true mate, into taking the blood oath so that both of them would be forever bonded to her. Maeve summons a sadistic warrior, who beats Aelin savagely and tells her that unless she comes willingly, Elide will be beaten as well.
Manon, knowing the importance of keeping the Wyrdstones safely away from Maeve, doesn’t help Aelin. Since Maeve has no interest in the witch, she allows her to go free.
Maeve relieves Lorcan and Gavriel of their blood oaths and dishonorably discharges them from her service, but she keeps Fenrys. Maeve has Aelin put in a box made of iron to ensure that she cannot heal herself or recover her strength. Maeve leaves on her ship.
When Rowan finally arrives, he demands to know where his wife is. He and Aelin were married in secret the night before so that if she dies, Terrasen would have a king. Manon tells the others what happened in the mirror realm and gives the stones to Dorian, the other descendant of Brannon who can banish Erawan.
As the group stands in shock and grief over Aelin, a fleet of ships carrying Prince Galan Ashryver of Wendlyn arrives. Across the marshes, the Silent Assassins of the Red Desert appear. Lysandra shapeshifts into the form of Aelin and greets them. She and Aedion will sail north to Terrasen with their allies, while Dorian will go with Manon to convince the Crochans to ally with them. Rowan will go to find his wife, and they will all meet in Terrasen.