The book starts with Thomas and the other teenagers known as the "Gladers", who had escaped from an experiment known as The Maze in the previous book, sleeping in the dormitory they were brought to by a group of rescuers. Thomas is woken by a telepathic communication with Teresa, the only female Glader, who is afraid. As he wakes up, he finds that the facility is being attacked by Cranks, aggressive zombie-like people that have been affected by a plague known as "The Flare". He and other Gladers escape into the facility's common area and discover that their rescuers are dead. They also find that Teresa is missing from her room, and in her place is a boy named Aris Jones. Aris explains that he escaped from a similar Maze experiment, dubbed "Group B", in which he was the only male. The boys discover tattoos on their necks assigning them roles. Aris is "The Partner" and Minho is "The Leader", while Thomas' tattoo reads "To Be Killed by Group B".
The Gladers re-enter the common area and find the bodies have disappeared. They find one of the scientists from WICKED, the organization that created the experiment, who explains that WICKED has been studying them to try to find a cure for The Flare. He tells them they have been infected with The Flare and must get through the Scorch, a burned out section of the land, to find a safe haven and get the cure.
The Gladers travel to the Scorch through a portal and find themselves in a tunnel filled with traps. They escape into the desert and find to a building in which a girl is screaming. Thomas enters the building and finds Teresa, who kisses him and tells him that he needs to stay away from her.
As the Gladers search for supplies, Thomas begins to remember the relationship he had with Teresa before their memories were removed. They find a city, but encounter a storm that kills several boys. They take refuge in a building where they find a group of Cranks led by a man named Jorge. Thomas convinces Jorge and a teenage girl named Brenda to help the Gladers escape in exchange for some of the cure. Thomas and Brenda get separated from the group and Thomas discovers a message written all over the city that says that he is the real leader. Thomas and Brenda are captured by another group of Cranks who drug them, but before they pass out Brenda tries to kiss Thomas. He refuses her advances due to his feelings for Teresa. Minho rescues them, but Thomas is shot in the shoulder with a rusty bullet that leads to an infection.
Thomas's infection gets worse, and WICKED captures Thomas to heal his wounds. A healed Thomas is later returned to the Gladers, where he explains that WICKED never wanted him to get shot and that they considered him very important. Thomas later receives a telepathic message from Teresa warning his that something terrible is about to happen and that she won't be able to help him.
The gladers come across Group B, now led by Teresa. Group B takes Thomas prisoner, and Teresa says that she plans on killing him. Some of the other girls tell Thomas that Teresa had never liked him and their earlier kiss had been against her will. Later, Teresa comes to Thomas with Aris. Teresa and Aris kiss, and she explains that she has been manipulating Thomas all along. They lock Thomas in a room where he passes out. While passed out, he remembers some of his past relationship with Teresa and Aris before he entered the Maze. Eventually, Thomas is rescued by Aris and Teresa, who explain that they were forced by WICKED to make Thomas feel totally betrayed, and that if they hadn't complied that WICKED would've killed Thomas. Thomas is conflicted, but no longer trusts them.
The Gladers and Group B make it to the location where the safe haven is supposed to be, but they are attacked by monsters. A WICKED vehicle arrives and they fight their way on board, but WICKED will only allow one of Jorge and Brenda to come with them. Thomas chooses Jorge, but overpowers the guard and tries to force him at gunpoint to allow both of them to stay. The guard agrees, telling them that this had been their actual test. Later, as they rest, Brenda communicates telepathically with Thomas, telling him that she had been working for WICKED. Teresa also telepathically communicates with him, telling him that the others are being told that he has succumbed to The Flare. Thomas telepathically tells Teresa to leave him alone, and she reminds him that "WICKED is good" before cutting off communication.