Plot
Thomas, Newt, and Frypan, the last of the free "Gladers", join with the Right Arm resistance to retrieve other Immunes from a carriage of a train operated by WCKD, the organization responsible for capturing and experimenting on these immune children, including Aris and Sonya. Aris tells Thomas that Minho, their Glader friend whom World Catastrophe Killzone Department (WCKD) had captured, was on a different carriage and is headed to the "Last City", WCKD's base of operations.
Against the orders of Vince, the leader of the Right Arm, the three head to the Last City to rescue Minho. WCKD is torturing Minho and several other children in the hope of developing a cure for the virus. The group is attacked by Cranks, humans infected with the Flare. However, Jorge and Brenda join them and save them.
The group makes it to the wall of the Last City, which is heavily fortified. Outside the wall, people are rallying in protest to be let into the city. When WCKD opens fire at the protesters, the group is captured and taken to a hideout by a crew wearing gas masks. One of the members is revealed to be Gally, who was presumed dead. He then takes them to meet Lawrence, a rebellion leader, who helps Thomas, Newt, Gally, and Frypan enter the Last City.
Gally takes Thomas and Newt on a city tour and, after spotting Teresa, tells Thomas that he can get them into WCKD headquarters. Newt then shows Thomas that he is infected. Promising to cure him, Thomas and Gally capture Teresa. Disguised as WCKD soldiers, they escort her inside WCKD headquarters and toward the location of the Immunes. Gally looks after the Immune children and stays to find a serum that slows the Flare.
Thomas, Teresa, and Newt go to find Minho but are discovered and chased by Janson. Teresa lets them escape to find Minho before going to do a blood test on Thomas' blood, obtained when she was removing trackers from the Gladers. After delivering the Immune children and the serum to Brenda, Gally returns to WCKD headquarters to find Thomas. Brenda is forced to flee with the Immune children to avoid capture. Thomas and Newt reunite with Minho and escape from the WCKD building. Teresa discovers that Thomas' blood can cure the Flare. She shares her discovery with WCKD's leader, Ava Paige, who agrees they must find Thomas. Brenda and the Immune children escape WCKD with Frypan's help.
Meanwhile, Lawrence rallies his rebels outside the city before sacrificing himself to blow a hole in the wall, allowing his allies and the infected people to storm the city. Gally saves Thomas, Newt, and Minho from WCKD soldiers. While Minho and Gally go to get the serum from Brenda, Thomas gets a pendant from Newt before he passes out. Teresa transmits her voice throughout the city and tells Thomas that his blood can save Newt if he returns to WCKD. Nearly consumed by the Flare, Newt regains consciousness and attacks, then begs Thomas to kill him. When he refuses, Newt fatally stabs himself with his own knife. Thomas returns to the WCKD facility and confronts Paige.
While Paige talks with Thomas, Janson, who is also infected by the Flare, kills her and sedates him. Teresa successfully removes some of his blood. When she hears that Janson is only interested in curing himself and others he deems worthy, Teresa knocks him out and frees Thomas. Thomas then fights with Janson and releases two Cranks, who kill him. With the building on fire, Thomas and Teresa escape to the roof, and she gives him the cure. The rest of the team arrives on a Berg. Teresa helps an injured Thomas on board, but the building collapses, and she falls to her death.
The group escapes with the rest of the Immunes to a safe haven island where the remaining population can live safely and rebuild civilization. Thomas discovers that Newt's pendant has a note in it, asking him to look after everyone and thanking him for being his friend.