The story picks up where the second book, The Scorch Trials, left off. Thomas has been in solitary confinement for some time now. He has lost track of how long it has been. The smell of his own body is driving him crazy. He thinks about what Teresa could possibly have meant by saying 'WICKED is good'. Rage fuels Thomas’s exercise and movements in his confinement. On the twenty-sixth day, Rat Man comes in and talks to Thomas. The two banter and argue. Rat Man references Thomas’s own vague role in planning some of the tests that have been done to him. Rat Man also reveals that Thomas does have the Flare—but he is immune to it. He says the rest of the world really hates this rare group of immune people. Rat Man also tells Thomas that all of the terrible things that have been done to them are meant to stimulate patterns for data to be collected in the 'killzone', another term for the human brain. Rat Man reveals that not everyone in Group B was immune to the Flare: some of them were control variables. He does not, however, say who is immune and who isn't. Thomas leaves with Rat Man, and takes a shower. Rat Man then takes him to a small auditorium, where the rest of his friends are waiting. They all greet each other; Teresa says she had been trying to reach Thomas the whole time, but their telepathic connection had been cut off. Rat Man says that WICKED is now going to give the Gladers back their memories from before the memory Swipe.
Thomas, Minho, and Newt agree that they do not want their memories restored, but other Gladers are still leaning the other way. Rat Man takes everyone down to the surgery room. Teresa asks if this Swipe removal will also remove WICKED’s control of their minds. Rat Man says that it will. He also goes down the list of who is not immune to the Flare; included in the list is Newt. As they prepare for the surgery, Teresa tries to convince Thomas to do the surgery with her, but he sides with Minho and Newt instead.
Doctors and other personnel start piling into the room. Frypan defects to accepting the surgery at the last moment. When Minho, Thomas, and Newt refuse, Rat Man says that they will want to reverse their decision. Rat Man also tells them that his real name is 'Assistant Doctor Janson'. When Janson takes them to their allotted surgery room, Thomas sees Brenda, who dashes over and gives him a hug. She whispers in his ear that he should not trust anyone except herself and Chancellor Paige. Thomas and Teresa are confused about why Brenda is here; Brenda is even dressed in the WICKED personnel attire. Janson tells Thomas, Newt, and Minho that they are being watched, and that armed guards will hurt them if they try anything. Immediately after these words, guards with Launchers, gun-like weapons, come and haul Thomas, Newt, and Minho over to separate rooms so they can contemplate their so-called mistakes. Thomas, Newt, and Minho eat some food and talk about how they are going to take the next available opportunity to escape. They cannot believe anything more than WICKED says.
That night, Thomas dreams again. He dreams of WICKED taking him away from his mother. In the dream, his mother tells him that his father had succumbed to the madness. Thomas and his friends wake up when Janson comes in and says that they are going to forcibly restore their memories anyways. The boys follow Rat Man back through the labyrinthine passages, and then attempt to overpower the guards. Thomas, Newt, and Minho are overpowered after their attempt. Thomas, who has begun to connect the dots through his dream-flashbacks, yells at Janson that he was brainwashed into working for WICKED when he was a child. Janson assigns Brenda as Thomas’s technician for his surgery.
Thomas pleads with Brenda to help him. Brenda, still putting up an act, gives him hints that she is on his side. She also tells him that both she and Jorge were acting back down in the Scorch. Both of them are immune, which is why WICKED used them. As Brenda prepares for the surgery, she instead injects one of the guards who is holding Thomas down. She and Thomas overpower the guards, take their ID cards and Launcher weapons, and go to rescue Minho and Newt. Thomas shoots Rat Man in the chest with a Launcher in order to save his friends. As they run down the hallways, they shoot a few more guards and take one captive for information. Brenda says they need to find Jorge, who is a pilot and can help them escape. As they reach a room that they want the captive guard to open, an alarm goes off and the lights go out. The guard escapes. Brenda, Thomas, Newt, and Minho still open the door, and find no one there. The hallways are eerily empty, and as Brenda, Thomas, Newt, and Minho reach the armory for weapons, they wonder if their escape attempt is just another trap.
Thomas wakes up in solitary confinement and finds that this is unbearable. He feels like he is in the Box again. He has “unlimited time to think about the disease rooted inside him” (1), but instead he is most bothered by the smell of his own body odor. It is a very humanizing smell, but at the same time Thomas realizes he is most bothered by this because he is not being treated like a human. WICKED has not even allowed him to clean himself and have a change of clothes. To Thomas, the entire concept of solitary confinement is rather inhumane.
When the Rat Man finally comes in to talk to Thomas, he reveals the truth about Thomas being Immune, and also tells him that WICKED is done running tests. Although the Rat Man seems like he has come to give Thomas information and to answer questions the boy may have, he really came to continue to scope things out for his desired ultimate procedure—the one that would ask Thomas to sacrifice himself for science. The Rat Man believes that the end can justify the means (9), a notion for which Thomas has no good response. In fact, all of WICKED—and much of the world in general—has operated on the belief that the ends justifies the means, considering the catastrophes that have happened. This is the human instinct for survival taking over.
When the Rat Man tells the Gladers that he will be removing their memory Swipes, Thomas talks to Minho and Newt privately about the procedure and about what the Rat Man said to him. He does not trust the Rat Man, which is why he does not want to undergo the procedure. Even though the Rat Man makes it sound like it is a good thing—he tries to make it sound like he is doing the Gladers a favor—the Rat Man’s procedure is suspicious. Thomas says that he no longer believes, as Janson does, that the ends justify the means, though he says that he used to, noting that “before they swiped my memory, I think I used to buy all that junk. But not anymore” (42). Thomas does not want to have his confusing layers of memories lead him to the wrong conclusion.
The confusing layering of memories in Thomas’s mind is reflective of the lies that WICKED tells. WICKED tells complex lies, too, lies that layer upon each other. For example, even in this case, Thomas is unable to tell whether or not he trusts Janson’s words, or whether Janson could just be spinning lies about the ends justifying the means. Janson could possibly be spinning lies about the removal of the memory Swipe procedure.
After stowing away Thomas, Minho, and Newt for their belligerence and rebellion, Janson comes back. Janson then does something that he will establish as a pattern for the rest of the book: he tells the three boys that they now do not have any choices left. Janson has decided that they will all get the procedure done, whether or not they like it. Thomas, Minho, and Newt are not excited about this idea; even though Janson says that the Trials and the lies are technically over, he still retains control over the subjects, and still wants them to have no self-determination. As a governing body, WICKED has gotten very hungry for power and control.