A teenage boy named Thomas wakes up in a vertically moving box with no memory of his past, other than his name. When the elevator (box) doors open, he is pulled into a glade - with few trees and a wide open plain surrounded by thin forests - by a group of teenage boys who also have no memories besides their name.
Thomas gradually discovers that the Glade is run by two boys: Alby, the leader, and Newt, the second-in-charge, who both maintain order by enforcing strict rules. The elevator box surfaces the ground once every month to supply new food, sometimes weapons, and always a new boy. The Glade is surrounded squarely by a mile-high wall made of concrete. Outside the wall is the Maze, a labyrinth of high concrete walls covered in ivy. The Maze houses strange, lethal creatures known as Grievers. Grievers are described as monsters of metal and flesh. The Gladers are trying to stay alive as well as "solve" the Maze by running through it as fast as they can while tracking movements of the walls and trying to find an exit to escape. Every month the box is sent up with a new person called a "greenie" and every two weeks supplies are sent.
A few days after Thomas' arrival, a girl is delivered through the elevator into the Glade with a note saying "She is the last one ever" It implies that there were to be no more children sent into the Glade. The girl subsequently lapses into a coma. When Thomas comes to visit her, he recognizes her, but can't remember her name until he hears her voice telepathically in his head telling him that her name is Teresa. Her arrival triggers everything in the Glade to change: the sun disappears, the deliveries of supplies stop coming, and the doors of the Maze stay open at night, which allows the Grievers to enter the Glade and hunt the children. Thomas proposes that the walls of the Maze aren't random, but that their movements are actually a code, leading to the discovery that the Maze is spelling out words. Thomas also discovers that the Cliff that they all thought was just a cliff turns out to be where the Grievers leave the Maze or "The Griever Hole". If they can come and go over the edge of the Cliff, then maybe so can the Gladers. This drives Thomas to think they need memories to get out, so he purposefully gets stung by a Griever so he can go through the changing. The changing is a process that begins after you get the serum called the grief serum to cure the infection from the Grievers.
Teresa, wakes up and tells Thomas that they knew each other before they were put in the Glade, and reveals that they can communicate telepathically.
Most of the Gladers decide to make a run for the exit, knowing that it could be suicide trying to take on the Grievers, but figuring that nothing could be worse than being stuck in the Glade. They succeed, only to find out that what they've been doing is an experiment being conducted by W.I.C.K.E.D.. Gally, one of the Gladers who always knew something was different about Thomas and hated him for it, appears at the lab to which the teenagers escape. He hadn't originally escaped with them, and he is acting as though he is being controlled. He moves to throw a knife at Thomas, but Chuck, the youngest Glader and Thomas' friend, jumps in front of it.
After briefly mourning the death of Chuck, the boys and Teresa are "rescued" by a group of people and brought to a safe haven while being told about "the Flare" — an apocalyptic occurrence that killed off half of the world's population.
The epilogue reveals that the "group" who rescued the gladers may just be another variable in the experiment, and that the Gladers weren't the only group being evaluated.