In a quarantined area, hundreds of people are begging for help. A desperate woman goes through the crowd and tells her son that she loves him before handing him to the soldiers. He and other children are sent off on a train where Ava tells them that it’ll be fine.
This kid grows up to be Thomas, who is put in a closed glade with other teenagers. Their goal is to escape a maze full of monsters that surrounds the glade, and when they finally achieve it, they discover a lab that tells them the maze was an experiment by the Wicked company to find the cure for a virus that has destroyed humanity. Before they could process this information, a bunch of soldiers drag them out of the lab and take them away in a helicopter.
A few hours later the chopper lands on a desert. As the group descends, they find themselves surrounded by zombie-like creatures known as cranks. The soldiers immediately open fire, keeping the group protected as they make their way to a huge facility.
Inside they meet Janson, who introduces himself as the leader of this sanctuary. Since the teenagers are immune to the virus they’ve become a target for Wicked, but Janson promises they’ll be safe if they stay here. Then the group washes up before going to the medical bay, where they’re given vitamin injections before the doctors run some tests.
Thomas notices that Teresa receives private attention from Doctor Crawford. Afterward Janson interviews Thomas because he wants to know what side he’s on. Since all the teens are sent to the maze with amnesia, Thomas explains he remembers he used to work for Wicked but not much else.
When all the medical tests are done, the group is allowed to go to the cafeteria, where they’re shocked to learn there were other mazes and all the kids in the room are the survivors. They befriend a boy who tells him his team has only been here for a couple of days. The teen that has been in this facility the longest is Aris, whose maze had been mostly girls and he’s been here for a week.
At that moment Janson comes in to call a bunch of names, who will be relocated to a new safe home. Then Thomas notices Teresa walking down a corridor with Crawford and tries going after her, but the guards immediately stop him. That night Thomas hears a voice whispering in the dark and is shocked to find Aris in the vent asking him to follow him.
Thomas does so and after crawling through the vents for a while, they reach a grill where they can watch Crawford and her nurses pushing a body in a strange-looking stretcher. Aris tells Thomas that they bring new people every night but he’s never seen anybody come out, so he concludes that the teenagers don’t truly leave this place. The next day during dinner another group is called by Janson.
Thomas tries to follow them and is stopped by the guards again, but this time Thomas keeps pushing and the guards have to use force to stop him. The other teens rush to pull Thomas back and Janson orders his men to send this group to their bunks. In their room, Thomas reveals he caused that scene to steal the guard’s ID badge and intends to find out the secret of this facility.
However Newt thinks Thomas is overreacting and he should be thankful they have food and shelter now. At that moment Aris appears in the vent and Thomas follows him. Soon they reach the corridor outside the mysterious lab and Thomas uses the badge to open the lock.
Inside he’s shocked to see tubes filled with Grievers, the monsters from the maze. In another room the boys are horrified to find all the teenagers who were called for relocation. They’re unconscious and hanging from a machine that is harvesting a blue liquid from their bodies.
Suddenly Janson comes in and the boys run to hide. He turns on a screen to video-talk to Ava, which means this facility is working for Wicked. She asks him to get all the teenagers he has sedated and prepped for harvest since she’ll be visiting soon.
Ava also asks about the rebel group living in the mountains known as The Right Arm, which has been attacking various Wicked facilities. Janson promises that his men will find the rebel headquarters soon. After Janson is gone, Thomas and Aris return to the bedroom and tell their friends everything while blocking the door.
Soon Janson comes to pick up the boys and his guards have to push the door open, but the teens are already gone. Thomas’ team has escaped through the vents and makes it to another corridor, where Aris announces he’s staying because there’s something he’s gotta do. The group starts running and bumps into Crawford, so they force her to take them to Teresa.
The alarms go off and Janson finds the boys on the security cameras. A guard immediately appears in the corridor and uses his stun gun to try to stop them, but Min-ho brings him down by kicking him against the wall. After taking the guard’s gun, the group rushes to a lab to find Teresa on a bed.
More guards are coming so they block the door with a table before breaking a window to reach a different exit. There’s another guard on the other side and Thomas immediately stuns him with the gun. The team keeps running and reaches a closed gate that the badge can’t open.
Janson and his men appear in the corridor, saying that if they leave they won’t be able to survive the harsh conditions outside. At that moment the door opens revealing Aris, so Thomas shoots at Janson’s group to distract them before running through the door with his friends right before it closes. Aris destroys the lock and the others grab a few weapons before rushing to the front gate.
There’s a sandstorm outside and the guards are coming after them, but the teens keep going until the storm makes it hard for their enemies to follow them anymore. After running for a while, they find an abandoned building and go inside to spend the night. Thomas and Aris decide they should try finding the Right Arm in the mountains.
Then they notice some footprints on the ground and follow them to find a room with supplies, which means someone used to live here. They take what they can carry before splitting to search the building. In another room Thomas and Min-ho find a dead body and a bunch of cables that they follow until they see a generator.
Min-ho turns it on and now the whole building has power. Suddenly some cranks appear behind them, so Min-ho brings one down to create an opening and the boys run into a different room, quickly closing the door to keep the cranks out. Then they push down some furniture to block the door, however this room is full of cranks too.
The duo keeps running to reunite with the others and now everyone hurries to escape together. Aris uses a bat to bring down a crank that gets too close and Teresa hits another one with a hammer. A crank bursts through a window and tackles Newt to the ground, but his friends quickly kick the creature off to rescue him.
They find a narrow corridor in the wall and run through it, but the door at the end is locked. While the group tries to open it, Winston uses his gun to hold the cranks in the corridor back, killing a few of them. After lots of kicking and pushing, the door is opened and the group can keep going.
Unfortunately Winston is grabbed by the cranks and his stomach is heavily scratched by their rotting hands. His friends manage to grab him and pull him away from the cranks so they can move ahead. The chase continues until the teenagers find a safe spot to hide and sleep there for the rest of the night.
The next morning the group leaves the building and discovers they’re in the middle of a city in ruins. Suddenly they hear an engine-like noise and rush to hide right before the Wicked helicopters pass by. Thankfully they aren’t seen and after the choppers are gone the group keeps moving, only for Winston to collapse.
He’s really sick and can barely move so the others have to carry him on a makeshift stretcher. For the next few hours the teens continue to cross the desert and even deal with a sandstorm. When they stop to rest, Teresa shows Thomas a tattoo that has appeared on her neck and reveals she’s recovered all her memories.
She remembers meeting Thomas as a kid and explains they joined Wicked to help the world, so she thinks they should go back to them but Thomas refuses. At that moment they hear a shot and discover that the others caught Winston with a gun. The boy is getting worse and he’s now throwing up blood.
He lifts his shirt to show them that the infection is quickly spreading and he’ll turn into a crank soon, so he wants it to end before he reaches that stage. Newt gives him back the gun and the group leaves, hearing the gunshot that ends Wintons’s life on their way out. The journey continues with the group sleeping on the ground and suffering the heat during the day while the water slowly runs out.
One night Thomas sees some lights in the distance right before a massive lightning storm appears nearby. The group starts running toward the lights while avoiding all the lightning bolts striking the ground. Unfortunately a bolt manages to hit Min-ho and knocks him out, so his friends have to drag his body the rest of the way.
They manage to make it to a building and hide inside. Afterward they check on Min-ho, who wakes up sore but fine. Teresa smells something funny and is suddenly attacked by a crank that she dodges just in time.
More cranks appear in the darkness, but they’re all chained to the walls. Suddenly a light is turned on by Brenda, who calls the cranks her guard dogs and takes the teens to another room where she lives with a bunch of survivors. Then they meet the leader Jorge, who calls the Right Arm “ghosts”.
When they refuse to say where they come from, the men hold them down and Brenda uses a laser to reveal a tattoo on Thomas’ neck that matches Teresa’s. This marks him as part of Wicked and Jorge calls him valuable, so the group is hung upside down from a hole while Jorge decides what to do with them. Moments later Brenda finds Jorge packing.
He thinks that if he gives the kids to the Right Arm he’ll be welcomed into their shelter too. Meanwhile the kids push each other on the ropes until Teresa reaches the lever and manages to free herself. At that moment a team of Wicked soldiers sneak into the building and begin bringing down all the guards.
Janson appears in a helicopter and asks everyone to turn themselves in, but this only causes panic among the survivors. Teresa helps the others get off the ropes too but when they’re about to leave, a man blocks their way and calls Janson to say he’s got them. Thomas grabs the man’s armed hand and headbutts him, but it’s not enough to bring him down and the man tries to shoot them anyway.
However he’s killed first by a shot from Brenda, who volunteers to guide them out. Jorge finishes taking care of some explosives and plays a song on all the building’s speakers before running to meet with the group. He tells them he can lead them to the Right Arm and opens a window where he’s installed a zip-line, which he uses to cross the gap between buildings.
All the teens cross after him except for Thomas, who runs after Brenda when she goes back to pick something up. Soon they’re surrounded by soldiers and Brenda opens fire, creating a distraction for them to run. The duo has to walk on some narrow steel beam to make their escape and the guards can’t shoot them because they’d fall to their deaths and they need them alive.
When the song ends, it triggers Jorge’s bombs and a massive explosion kills the guards. The building is starting to collapse, so Brenda and Thomas use some cables to slide down an elevator shaft and reach the lower floor before the debris can crush them. The debris also blocks the shaft, so their only option is to escape through the sewers.
After walking around for a while, they find a mysterious plant covering the walls and a crank attached to it eating a live rat. Soon dozens of cranks appear and Thomas hits one to open the way so they can run. A new chase ensues and after a few turns in the dark, Thomas and Brenda find themselves on the edge of a collapsed building.
Since the cranks are still coming after them, they start climbing up while dodging any falling debris or objects. Brenda kicks a crank off when it gets too close, but when she tries to hold on to a metal bar it breaks and she falls, landing on a cracked window that cracks further when she moves. A crank appears and starts fighting her on the glass, so Thomas rushes to grab her before fully breaking the glass to make the crank fall into the abyss.
Afterward the duo manages to leave the building safely, only for Brenda to reveal a bite on her leg. She swears she’s fine and the duo keeps going until they find a settlement of survivors. Desperate for information, they talk to a guy named Marcus, who forces them to have a drink before allowing them into his club.
While they look for their friends or any clues on the Right Arm, Thomas discovers they keep a crank in the club to shoot it for fun. Since it appears there’s nothing of interest here Thomas wants to leave, but Brenda is being affected by the drink and asks him to stay before kissing him. Thomas can’t help thinking about Teresa and breaks the kiss to turn Brenda down.
A heartbroken Brenda walks away and Thomas tries to follow her, but he keeps getting haunted by visions of his friends as cranks and Grievers. Eventually he collapses and passes out. Suddenly Thomas finds himself in a strange facility, telling Teresa that he did something big because he couldn’t watch his friends die anymore.
The conversation is interrupted when guards drag him away. At that moment Thomas wakes up and realizes it was a dream. He’s in an old building with his friends and Jorge is beating Marcus up for information.
Marcus admits he lures teenagers to his club with his free drinks and later hands them over to Wicked. A furious Jorge kicks Marcus and threatens to shoot him, so Marcus finally tells them that the Right Hand has an outpost in the mountains. Since walking would expose them to Wicked, the group decides to steal Marcus’ car to continue their journey.
Eventually they make it to the mountains and find the road blocked by abandoned vehicles, so they have no choice but to continue on foot. Suddenly hidden shooters open fire at them and the group rushes to hide while concluding Marcus sent them to a trap. Jorge gets a bomb ready but before he can throw it, they’re surrounded by two armed women.
The ladies are quite aggressive, however they calm down when they recognize Aris because they used to share a maze with him. They decide the group is trustworthy and the shooters come out of hiding. Afterward the rebels take Thomas’ group to the Right Hand’s secret settlement.
Unfortunately they don’t have many people left because Wicked keeps killing rebels whenever they can. While meeting the leader Vince, Brenda collapses because her infection is spreading. Vince wants to kill her and Thomas begs for mercy, but Vince won’t listen.
When he’s about to shoot, former Wicked scientist Mary stops him because she recognizes Thomas and says he can help. Mary reveals that the last time they talked Thomas gave her the coordinates of every Wicked lab, so the Right Hand wouldn’t exist without him. He’s been a rebel all along, a choice he made because he was tired of seeing kids die during Wicked’s experiments.
Brenda is taken to a tent and Mary takes a blood sample from Thomas to create some medicine while explaining the point of the maze. Immune kids produce a special enzyme in survival situations, but it can’t be manufactured in a lab. That’s why Wicked harvested it directly from the bodies of former maze kids.
All this is overheard by Teresa while she spies on them. Mary then injects Brenda with Thomas’ enzyme and it slows down the infection, but she’ll need more in a few months. In the evening Thomas talks to Teresa, who shares the story of her mother’s slow agonizing death.
She doesn’t want other people to suffer like her mother did, which is why she’s been working for Wicker all along. She’s called them and told them the location, so the helicopters are now approaching the settlement. Before Thomas can warn everyone, the choppers open fire and a bunch of soldiers come down to start shooting people with stun bullets.
As the rebels begin to panic and run away, Vince and his armed guards answer the fire with more fire. Min-ho, Newt, and Winston soon join them and grab weapons to fire at the soldiers too. Thomas finds the nursery tent on fire but thankfully Jorge and Brenda have already gone out.
At that moment the soldiers throw a stun grenade and knock down Vince, his guards, and the boys. Jorge wants to run before the soldiers get them too, but Thomas wants to help his friends so he tells Jorge to leave with Brenda while he stays. Once the soldiers have captured all the rebels, Thomas turns himself in and Janson punches him.
Soon Ava also arrives in a bigger aircraft and tells the soldiers to load all the prisoners before checking on Teresa, confirming she’s been working for her. Both Ava and Teresa point out all this is for the greater good and Mary calls them out, so Janson shoots her. The soldiers try to take Thomas into the aircraft but he reveals he’s got a bomb before asking Ava to release all the kids if she doesn’t want him to self-delete.
His friends show their support but before Thomas can press the button, Jorge drives in on a truck and pushes a van to create a small explosion as a distraction. Chaos takes over the area again and Thomas uses the chance to throw the grenade at the soldiers, killing most of them. While the other soldiers rush to escort Ava back into the aircraft Janson punches Thomas and gets ready to kill him, only for Brenda to bring him down with a shot.
The rebels take the guns from the fallen soldiers and begin fighting back while Vince brings down a helicopter using his machine gun. Unfortunately a soldier manages to hit Min-ho and he’s taken away. Thomas wants to help him but Jorge stops him, forcing him to hide in the mountains with the other running rebels.
Janson and Teresa join Ava in the aircraft, which flies away with half of the group. In the morning, the Right Hand has lost all hope. However Thomas is tired of running and announces he’ll try to infiltrate the Wicked headquarters to rescue Min-ho and kill Ava.
The rebels think he’s crazy but they’re desperate for revenge and agree to help him.