Pandemonium is told from two perspectives: "Then," when Lena first enters the Wilds, and "Now," when Lena is living in New York City pretending to be cured while spying for the resistance.
The story begins right after Lena's dramatic escape from Portland, Maine, which left her wandering, injured and alone, through the Wilds, the unregulated area outside the city. Lena is wracked with guilt and sadness over losing Alex, the rebel boy she fell in love with, even though love (amor deliria nervosa or delirium) has been declared a disease by the U.S. government. Alex gave himself up so Lena could escape into the Wilds to avoid "the cure," which is a government mandate for delirium. The last time Lena saw Alex, he had been shot as an army of men descended on him.
Near death, Lena is rescued by a group of rebels led by a young woman named Raven and her second in command, Tack. After Lena is nursed back to health at a rebel's homestead, she slowly becomes a part of their community, learning that life in the Wilds is much more physically demanding than life in the city.
With cold weather approaching, Raven decides it is time for the rebels to move to another homestead in the South for the winter. She sends scouts ahead to mark the way and bury food. But the government bombs the homestead before the rebels can leave. Some of the rebels die, and Lena and others barely escape with their lives.
The journey is hard, and without food, medicine, proper clothing or first aid, more rebels die. Additionally, the scouts don't return and are feared dead. Lena's anger about losing Alex and so many other things in her life intensifies, and she is filled with hatred. She agrees to have a procedural scar cut and branded behind her ear so she can work as a spy for the resistance; the scar marks her as someone who has had the cure.
After heading south for several weeks, the rebels are tired and hungry, and see no sign of the scouts that were sent ahead. They are attacked by Scavengers, a group of uncured people who are not fighting to get rid of the cure like the resistance, but create havoc by stealing and destroying everything in their path. Lena and Raven become trapped and are about to be killed when the scouts, Tack and Hunter, show up and shoot the Scavengers.
Several months later, Lena has become an active part of the resistance, living in New York City and posing as a high school student who has already received the cure. She lives in a small apartment with Raven and Tack. The apartment has a hidden room filled with fake IDs and other resistance paraphernalia. Lena attends a Deliria-Free America (DFA) meeting where Julian Fineman, son of DFA founder Thomas Fineman, speaks about the cure for deliria. Julian has had seizures since he was young and had several operations to remove brain tumors. Another procedure, such as the cure, may leave him in a permanent vegetative state or kill him, but he believes so strongly in the cure that he is willing to take the chance. After the meeting, Lena realizes that she left her gloves in the auditorium. When she returns for them, she sees a projector showing pictures of the mountains and oceans. When Julian sees her, he tells her that the images are surveillance photos and that the DFA is looking for rebel camps. Lena wonders what would be the point of Julian having the procedure if it kills him.
Lena, Tack and Raven attend a big DFA demonstration in New York City. The DFA is pushing for the cure to be administered before a person's 18th birthday, but the public is not convinced that the procedure is safe. Tack and Raven insist that Lena take a copy of the Book of Shhh, the DFA's religious teachings, and an umbrella in her backpack. They also tell her not lose sight of Julian. Lena does not know why they want her to do this, but she does as she is asked.
During the demonstration, Scavengers attack. They murder Julian's bodyguards and kidnap Julian. As instructed, Lena follows Julian and ends up kidnapped herself. The two are locked in an underground room connected to the subway system and given little food and water.
Trapped together, Lena lies to Julian, telling him that she is a high school student who has already received the cure. Julian is unused to being around girls and is distrustful of Lena; Lena is nervous that Julian will discover she is lying.
While talking to Julian, Lena realizes that Scavenger attacks are being blamed on the resistance. The public does not know that they are two separate groups with different motives. Julian also starts opening up to Lena, telling her he dreams of traveling the world.
After a few days of being held hostage, Lena wakes up to Julian watching her and running his fingers through her hair. She is angry with him for the rest of the day. Later he tells her that he found a key to his father's locked study and found several illegal books on love and other emotions. He read the books for weeks before his father caught him and beat him so badly that he passed out. He began having seizures after the beating.
When a guard takes Julian from the cell, Lena looks in her backpack to see if there is anything she can use to escape. She realizes that Raven and Tack have left her clues to escape in the Book of Shhh that point to the umbrella they insisted she carry with her. Lena breaks the umbrella apart and finds a knife hidden in the handle. Julian returns to the room beaten and bloodied.
Lena comes up with a plan for their escape and tells Julian that she is not who she appears to be. This angers Julian, because he believes that Lena's people are the ones who kidnapped and beat him. Even though Julian is upset with her, he goes along with the plan. They escape and hide in a supply closet where they find guns, food and DFA badges. They kill two guards in their escape.
Armed with a gun and some food, Lena and Julian make their way through the subway system. They take turns sleeping so they can keep watch for pursuers, but the kidnappers catch up to them and fight. Lena and Julian are saved by a group of uncured people who live in the tunnels and subway system beneath the city. The group's leader, Coin, tells Lena that the subway people, her people, are deformed and have been cast out of society. Coin promises to help them find their way out of the tunnels, and one of her people leads them to an area near a homestead.
Lena leads Julian to this homestead, and they lay in the same bed. Julian admits to Lena that he knows the cure would kill him, but he wanted it to. They kiss and fall asleep.
They wake up to a raid on the homestead as soldiers descend on them. One guard grabs Lena and puts her into a van, while another guard takes Julian. Lena is taken to a warehouse, where she meets Raven. It's then that she realizes her guard was someone from the resistance in disguise. Happy to be rescued but needing answers, Lena learns that the resistance orchestrated the kidnapping. They paid the Scavengers, who were working for the DFA, to be double agents. Both Lena and Julian were used to weaken the DFA, and Lena is outraged by this treatment.
After hearing radio reports that Julian refuses to undergo the cure and is scheduled for execution the next day, Lena sneaks into the city to find him. She breaks into Julian's house and finds out where he will be executed by lethal injection.
Lena gets into the medical facility where Julian is being held, but she does not have a plan to rescue him. Just then, Raven arrives dressed like a lab technician, shoots Thomas Fineman and helps them escape. Tack drives the getaway vehicle and takes them back to the warehouse that is the base for the resistance.
Lena is happy that she and Julian are safe at last. He kisses her and admits that he loves her. Julian asks Lena to promise that they will stay together, and she does, only to hear a voice behind her telling Julian not to believe her. Lena turns around and sees Alex.