The Scorch Trials picks up where the preceding book, The Maze Runner, left off. Thomas and the Gladers have been taken to a safe place in the midst of a post-apocalyptic wasteland, which has been ravaged by a plague called the Flare, by a group of “rescuers”. Thomas and his friends barely have time to reflect on their narrow escape from the maze before they are subjected to a new series of terrors. They wake up to a horde of infected people, nicknamed Cranks, pounding on the windows of their shelter and trying to get in. What's more, to his dismay, Thomas finds that he is unable to locate his friend Theresa, nor is he able to communicate with her telepathically in way that he used to. As they explore the previously safe building they find that all of their rescuers have been murdered and hung from the ceiling. They are quick to realize that they were never really rescued in the first place, and that it was all another illusion set up by WICKED. However, that is the least of their worries, as they meet a man who explains to them that they must cross 100 miles of the Scorch (the name given to what remains of the desolate, blisteringly hot earth) in only 2 weeks and reach an area called the 'Safe Haven'. It turns out that they too are infected with the Flare, and are sure to end up like the mindless people outside unless they make it to the Safe Haven and receive the cure. He informs them that their journey will not be easy; and they will face countless dangers along the way. Minho, Thomas' best friend and secondary leader of the group, is quick to display his characteristic bravado when he argues with the man, mockingly nicknaming him 'Rat Man' because of his appearance. Eventually, they realize that it would be useless to try and reject WICKED's plans for them, and agree to follow Rat Man's instructions.
Their journey across the scorch begins with a long walk down a dark and intimidating passage, which requires them to persevere despite the eerie disembodied voice of a man which tries to dissuade them. As they continue down the tunnel one of the Gladers, Frankie, is killed by a spinning metal orb which decapitates him suddenly, shocking and scaring the group- who previously still held out hope that Rat Man may have been lying about the dangers he promised. Thomas once again asserts his role as leader and bravely leads the group out of the tunnel and up onto the arid landscape above.
It soon becomes apparent that the sun is far too hot for them to travel without protection so Newt, Thomas' main adviser and friend, suggests that they wrap bedsheets around their bodies to protect themselves. Once they are properly protected, they begin to walk towards a ruined city they spot in the distance. As they get closer, they notice two figures walking towards them. Upon closer inspection, it turns out to be a man and a woman. They warn Thomas and the group about the Flare, mentioning “another group” to them. They realize that this must be Group B (the other group who was subjected to the maze in the previous book), but before they have the chance to ask any questions the man and woman turn and run back towards the city. Feeling they have no choice, the Gladers decide to follow.
They run towards the city for several days, resting in the daytime and running at night to escape the blistering sun. As they finally reach their destination, they hear a girl screaming. They follow the noise and Thomas can hardly believe his eyes as he sees Theresa step out from inside a building- right where the screams had been coming from. Minho and Newt try to reason with him, telling him it may be a trap and that he shouldn't go to her, but nevertheless Thomas acts impulsively and sets off to the building on his own. Inside he finds Theresa, but she is not the way he remembers her. It seems as though she is struggling against something, and Thomas suspects that WICKED may be controlling her, they way they controlled Gally (forcing him to attack Thomas in The Maze Runner). Theresa is able to break away just long enough to comfort Thomas, kissing him for only a few seconds before being forced to back away and warning him to leave. She tells him “Don't argue. Just leave. Run.” Thomas, heartbroken, promises to find her again before running out of the building as fast as possible, not even stopping to properly explain to the rest of the group, and sprints into the desert with the confused Gladers in tow.
By the time Thomas has calmed down a furious Minho catches him up, who orders him to explain exactly what he saw inside the building and why they had all been running for the last few hours non-stop. Thomas explains everything and Minho is sympathetic, realizing that Theresa means a lot to him. They agree to renew their efforts to get to the city and lie down under the sheets to get some rest before it becomes night. In the morning, they begin to trek towards the city again when a storm breaks out. It is unlike any storm they have ever experienced, and there are giant bolts of lightning crashing to the ground all around them as well as winds strong enough to knock them over as they desperately sprint towards the safety of the city. Several Gladers, including Minho's friend Jack, are hit by the lightning and killed gruesomely. Minho himself is set on fire by a lightning strike, and Thomas once again shows his courage by carrying Minho towards the closest building in the city where all of the Gladers are safe from the storm.
In the morning, Thomas, Minho and Newt discuss the next course of action. Despite his painful injuries, Minho still shows good humour and jokes around with Thomas in an attempt to lighten the mood. Before they can get moving, a man surprises the group by jumping down from the ceiling. He introduces himself as Jorge, “The Crank who rules this place.” He threatens them, and Minho's confidence in the face of danger angers Jorge, who kicks him in his burnt leg. Minho is furious and jumps on Jorge before Thomas has a chance to stop him. Newt tries to prevent the fight as he notices more Cranks descending from above, just managing to pull Minho off Jorge as they draw their weapons. The Cranks seem ready to kill the group, but Thomas is able to convince Jorge to give him 10 minutes, one on one, to hear him out.
Thomas explains all about the maze and the WICKED trials that they are being put through, being careful not to anger the volatile Jorge and get himself and his friends killed. Jorge seems intrigued when Thomas tells him about the cure that they had been promised when they reach the Safe Haven. They strike up a deal- Thomas will take Jorge and one of his best fighters, Brenda, to the Safe Haven to receive the cure, and in return Jorge will help Thomas and the Gladers to get through the city safely. They arrange to make a distraction to get away from the rest of Jorge's group of Cranks in order to sneak away and escape. As they group together to plot we are introduced to Brenda, who is smart and a good fighter. She and Thomas strike up a strange friendship in the midst of their predicament, but Thomas can't help but miss Theresa.
However, the Cranks in Jorge's group catch onto their plan, and manage to collapse the tunnel that the Gladers are in. Panicking, Thomas has no choice but escape with Brenda, leaving his friends behind. They escape through the Underneath- a series of tunnels under the city. On the way out they encounter two fully-gone Cranks, a reminder of what they will both become if they don't find the cure. They are both insane, and Thomas realizes that it is the Cranks or them. After a struggle, he kills them both with Brenda's knife. Eventually they make it back into the dusty wasteland of the Scorch, where they find something completely unexpected. As they walk down an alleyway, they hear what appears to be a party. They realize that it would not be wise to stay there, and turn to leave only to find their path blocked by two threatening figures. They politely ask Thomas and Brenda to join their party, and Thomas realizes that he cannot refuse when he notices they carry guns. Reluctantly, they follow the figures inside to what appears to be a normal party. They are greeted by a friendly man, who tells them to enjoy themselves. Thomas is just beginning to relax and think that perhaps there was nothing sinister about the party after all, when the man offers them a drink. Thomas initially declines, but the man soon becomes threatening again when he forces them to take the drink at gunpoint. As Thomas expected, the drink is drugged, and he and Brenda pass out before there is anything they are able to do about it.
They wake up to find that they have been tied up, and the threatening man begins to interrogate Thomas. Brenda puts up a struggle and they tape up her mouth. Thomas is just beginning to work out an escape plan when he hears crashes coming from the room above them. The threatening man seems confused, thinking that another group of Cranks must have found them, and he disappears upstairs. The noises continue for several more minutes until, to Thomas and Brenda's surprise, Minho bursts through the door.
As he frees them, Minho explains that he and the rest of the Gladers, along with Jorge, have been making their way through the city looking for Thomas and Brenda. Newt also appears and greets Thomas, before the group, reunited, make their way out of the building. The group begins to walk towards the safe haven again thrilled to finally be back together.
On their way they finally meet Group B. Thomas is shocked to find that Theresa, armed with a spear, is leading them. Group B greatly outnumbers them, and they surround the Gladers with weapons. Theresa shows no sign of knowing Thomas, and demands that he comes with her and her group. Thomas is hurt and confused, he tries to ask Theresa what is going on but she displays uncharacteristic brutality and hits him with her spear. She threatens to attack the rest of the Gladers, who are unarmed, unless Thomas comes with her. Reluctantly, Thomas follows her and leaves the Gladers behind. They put him inside a large sack, in order to make it easier to drag him across the desert. Thomas continues to attempt to communicate with Theresa, but she tells him that he has betrayed her and that she plans to kill him. After several hours, they reach the top of a hill, where Thomas is tied to a tree away from Group B's camp. Theresa leaves, and during the time she is gone Thomas is able to convince Group B not to let her kill him, saying that it must be another one of WICKED's tests, and that they should show independence and not listen to her. They agree to take Thomas with them to the Safe Haven.
Thomas and Group B resume their trek towards the Safe Haven, along with the Gladers who are being led by Minho. Eventually Group B catches up to the Gladers, who are only about a mile from the supposed Safe Haven. As they reach it, everyone is confused to see that the Safe Haven is merely a ribbon stuck into the dry earth with the words 'Safe Haven' written on it. As they begin to debate what to do, the two groups having very different opinions, white pods begin to rise from the ground. From them climbs a new horror manufactured by WICKED, humanoid machines covered in yellow bulbs, with spikes protruding from their hands. Thomas quickly realizes that this must be the final test, and gathers everyone together to attack them. He and Minho distribute the weapons between the two groups as evenly as possible, and they stand in a circular formation ready to attack the monsters that are converging on them from all sides. With a shout, they attack, and Thomas is able to quickly kill the first monster he fights by aiming for the bulbs. As he begins to tackle the second, he hears a thumping, mechanic sound coming from above. He looks up to see a WICKED ship, which is opening it's cargo doors to allow the surviving people in. Thomas, with his friends at his side, makes a mad charge for the cargo doors and manages to get inside, along with Minho, Newt, Brenda, Jorge, several other Gladers and members of Group B.
They experience a flood of relief as they cargo ship lifts off the ground, as they realize it is finally all over. The cargo ship transports them to a facility where they are allowed to eat, wash and rest. Little do they know, WICKED still has plans for them yet. The story is continued in the third book of the Maze Runner series, The Death Cure.