Whit and Wisty Allgood, a wizard and a witch, live as fugitives under the New Order, a totalitarian regime that has banned books, music, art, and free expression. Led by The One Who Is The One, the regime brands the siblings as dangerous criminals for possessing magical powers. Whit narrates from an unspecified future point, promising to tell the story of the Resistance, a rebel movement opposing the New Order.
The story opens with Whit alone in a gray, propaganda-saturated city, watching massive screens broadcast what appears to be his sister's execution. The One, a sinister figure wielding a crooked black stick, vaporizes a hooded prisoner on stage. Whit is devastated until a fiery explosion erupts in the crowd: Wisty has set herself ablaze, one of her witch powers, proving she is alive. The executed girl was actually Margo, a fearless 15-year-old Resistance leader. The One senses Wisty's fire and sends icy gusts after her. A mysterious old woman tackles a policeman, presses a map into Wisty's hand, and urges them to run. Following the map, they escape through a portal.
The portal deposits them into a shipping container full of books marked for destruction. Whit heals a dislocated shoulder using a spell from his journal, a blank book his father gave him that sometimes fills with spells or literature. A billboard displays their parents' wanted photos, reminding them they do not know whether Benjamin and Eliza Allgood are alive. Whit hears the voice of Celia, his girlfriend who was kidnapped and killed by the New Order, on a propaganda screen. Celia urges them to turn themselves in to save their parents and the Half-lights, lost souls trapped in the Shadowland, a cold dimension between realities. Both siblings dismiss the message as a New Order trick.
They find orphaned children and bring them to Garfunkel's, an abandoned department store serving as Resistance headquarters in Freeland, the shrinking territory outside New Order control. They deliver the devastating news of Margo's death, and Wisty rallies the grieving group with a fiery speech. Byron Swain, a former New Order collaborator and classmate whom Wisty once transformed into a weasel, reveals he has hacked the regime's broadcast to expose Margo's murder. A photo on his phone shows Celia's face hovering behind Whit, suggesting a disturbing link between Celia and the regime.
Desperate to find Celia, Whit secretly enters the Shadowland alone and is attacked by Lost Ones, monstrous decayed souls, barely escaping. The group then plans a mission to liberate children from an Acculturation Facility, a labor camp where kids are controlled through a musical pitch pipe. Byron smuggles Whit and Wisty inside using his New Order credentials. Wisty figures out the pipe's commands and leads the children in an escape. The One reviews the security footage and confirms Wisty possesses "The Gift," a power he covets.
At the Stockwood Music Festival, an underground concert in a drained reservoir, Wisty performs on stage and discovers a powerful connection between her magic and music. Backstage, she meets Eric, the drummer of a popular banned rock band called the Bionics. He takes her drumstick, a magical wand from her mother. A text in her mother's handwriting directs Wisty to trust the old woman from the plaza, now identified as Mrs. Highsmith, who teaches Wisty about the life-force energy in music and creativity.
When Wisty meets Eric at a diner in the City of Progress, it is a trap. Eric confesses his betrayal, and the Bionics morph into burly N.O. commandos. Whit bursts in, deflects tranquilizer darts with his mind, but Eric injects Wisty with a syringe from behind. Whit frees himself and escapes with unconscious Wisty, retrieving her drumstick. Soldiers pursuing them through the woods transform into bears. At a hilltop clearing where The One is waiting, Whit recites a poem from his journal and transforms into a tiger, but The One traps Wisty in tree roots, strips Whit of his tiger form, and hurls him into the sky.
Captured and brought to The One's headquarters, the siblings witness his power over weather. He commands Wisty to replicate the feat, but she accidentally shuts off electricity across the entire city, revealing immense but uncontrolled power. The One explains her Gift relates to electrical impulses and could control minds. He drains her magic, snaps her drumstick, and sends them to the Brave New World Center, a facility for "dynacompetents," the N.O. term for children with magical abilities. An omnipresent AI called ERSA monitors everything, and Byron is already there, confirmed as an informant for his father, a senior N.O. official. Wisty wins a magic competition but falls prey to addictive chocolate in the Reward Center that drains children's energy through electrodes. When she involuntarily bursts into flames, The One orders her to the Isolation Ward, where scientists torture her, demanding she surrender her Gift.
Byron leads them to a room where they find their shackled parents guarded by a creature, but the scene is a holographic projection designed to provoke Wisty. The One gives her 12 hours to produce her Gift or die and conjures snowfall to hasten hypothermia. Byron explains that Wisty's magic has partially transferred to him through past contact, amplifying their combined power. Using a fish-transformation spell from Whit's journal, boosted by Byron's touch, Whit and Wisty become guppies. Byron flushes them down the toilet into the sewer and out to a river.
Free again, their magic flows more strongly outside the Center's dampening influence. The One assigns Byron to lead a "Kill Team" of feral, formerly human children bred to hunt Wisty. The siblings disguise themselves as elderly people and infiltrate a book-burning rally, where Wisty causes thousands of books to sprout wings and fly to safety. The Kill Team pursues them through the Shadowland and back to Freeland, where Byron demands Wisty come with him, arguing that he and Wisty are the true prophesied pairing based on entries in Whit's journal. When both siblings refuse, he unleashes the Kill Team. Wisty seizes the Command Pipe, subdues the creatures, and transforms herself and Whit into hummingbirds to escape.
They return to Garfunkel's and discover months have passed due to a time warp. The N.O. has captured at least a dozen Garfunkel's kids and launched deeper raids into Freeland. Janine, Margo's best friend, now leads the group and orders an evacuation. In underground tunnels, Whit and Wisty discover that performing magic collectively amplifies their power. They transform bomber squadrons into ravens by chanting banned poetry, but each effort drains them, and Garfunkel's is destroyed.
At Mrs. Highsmith's apartment, a crystal ball connects them holographically with their parents, who appear gaunt but alive. Benjamin and Eliza tell their children to find their Gifts and "give them away." The One attacks with elemental fury, and Mrs. Highsmith, before being yanked through a window, reveals that fire, Wisty's element, is the one power The One still needs. Byron arrives with the Kill Team, revealing that Celia is now a Lost One who struck a deal with him in the Shadowland. In the ensuing chaos, Byron walks into Wisty's flames without burning, demonstrating their amplified connection. Whit levitates a cauldron to extinguish the fire, and they escape.
The One confronts them directly, splitting the earth and building a city-destroying tsunami. The siblings cycle through transformations, including griffins, discovering they can become creatures of pure imagination. Wisty offers to surrender her Gift to save civilians, but The One declares them failures and sends soldiers to capture them. At a public execution in a stadium, The One vaporizes Benjamin and Eliza before their children's eyes. A blinding light knocks The One to his knees, and hooded figures free the siblings. Wisty escapes through the panicking crowd but is separated from Whit. Her rescuer is Celia, who tells Wisty that without her and her Gift, hope will die. Wisty runs, resolved to find Whit, reunite with her friends, and journey to the Shadowland to find her parents, accepting that much is expected of those given great Gifts.