Thomas wakes up in a metal box with no memory of who he is. He only remembers his name. Doors open overhead revealing a community of young boys all living on a type of farm surrounded by very high walls. The place is called the Glade. Outside the Glade, beyond the walls is a massive Maze populated with monsters, known as Grievers. Every month a new boy is sent to the Glade. Each week supplies come up through the elevator that Thomas rides.
Thomas learns that in the Maze outside are monsters known as Grievers. If a Griever stings you, you will go through a process known as the Changing, which is quite traumatic. Thomas meets the leader of the Glade, Alby, and his second in command, Newt. There is also Chuck who becomes his friend. Gally emerges as a rival who is suspicious of Thomas. Minho is the leader of the Runners, the Gladers who go out into the Maze in an attempt to map it and find a way out.
The day after Thomas arrives a girl is sent up into the Glade, the first ever. Her name is Teresa. Teresa tells everyone that everything is about to change. She then succumbs to a coma. She will be the last one sent to the Glade. Thomas feels a connection to her, as if he knows her. He becomes infatuated with her.
Thomas decides that he wants to be a Runner as well. He is drawn to the role but he still has to learn much about the Glade and the Maze outside. Shortly after deciding this, Thomas is attacked by a boy named Ben, who has gone through the Changing. He states that he remembers Thomas from before and knows who he really is. Alby banishes Ben for attempting to murder Thomas.
While exploring the Maze Alby is stung by a Griever. Minho attempts to get him back into the Glade before the walls close but they are not going to make it. Thomas sees them and races out into the Maze to help, breaking a cardinal rule. He finds himself trapped outside in the Maze with them.
The Maze is most dangerous at night. That is when the monsters that inhabit the Maze are most active. Despite being the most experienced Minho panics when the Grievers approach and runs away. Thomas refuses to leave Alby and manages to save his life and his own. The three survive the night in the Maze, something no one has ever done before. It makes Thomas a hero in some eyes, a suspect in others.
Thomas is tried for breaking the rule and is sentenced to one day in the Glade jail. Some political maneuvering by Minho allows Thomas to become a Runner trainee upon his release. Gally objects to Thomas's presence in the Glade. He accuses Thomas of being a spy for the Creators, those who imprisoned the Gladers in the first place. Minho and Gally come to blows and Gally runs away after vowing revenge.
Alby is also recovering from the Changing. He too believes he has seen Thomas before. It is believed Thomas played some part in the design or building of the Maze. Thomas also visits Teresa who is still comatose. She begins to communicate with him telepathically. This frightens Thomas and he runs into the Maze to escape her voice. She tells him that the two of them were involved in the implementation of the Maze. He eventually returns to the Maze.
After spending a day in jail Thomas begins his training under Minho. He learns how the Runners map the Maze, looking for patterns as the walls move each night. They do not find anything new. That night Teresa tells Thomas that she has triggered the end.
The next day the sun has disappeared from the sky, replaced with a dull gray sky. Thomas realizes that the Glade is a fabricated place. The sky was never real. Teresa tells Thomas that the Maze is a code.
Teresa awakens and she and Thomas meet for the first time in a wooded section of the Glade. Thomas is attracted to her. They seem to share a history. However, Alby and Newt are suspicious of her.
That night the doors to the Maze do not close as they usually do. Alby and Newt imprison Teresa, much to Thomas's dismay. The Homestead, a large house in the Glade, is boarded up and reinforced as the Gladers wait for the Grievers to enter the area at night. Gally makes an abrupt return before willingly throwing himself onto the Grievers. He tells the Gladers that they will kill one of them each night until they are all dead. It is also discovered that all the maps of the Maze made over the years have been burned by an unknown arsonist.
Thomas determines a new way to analyze the map information. Thankfully, the maps burned were all decoys. Thomas is able to look at the real maps with Teresa's help. Together, they find a series of letters hidden in the maps, spelling out words. The words have no relation to each other. In an act of desperation for some of his lost memories, Thomas allows himself to be stung by the Grievers.
After recovering, Thomas explains that he and Teresa were forced to help the Creators design the Maze. He tells everyone that they share a telepathic link. He also knows the way out of the Maze is over a cliff face. The cliff is an illusion to trick them. It is where the Grievers enter and exit the Maze. If they follow the Grievers down they can find the way out by punching the code words into a computer on the other side.
Soon Thomas leads the Gladers into the Maze and they face off against a small army of Grievers. About half of the Gladers die in the fight but Thomas, Teresa, and Chuck make their way down the hole and are able to punch in the code and shut down the Maze. A door opens nearby.
The remaining Gladers, about twenty in number descend down a spiraling slide that dumps them out in a massive underground bunker. There they come face to face with the Creators: thin, pale, joyless adults who take copious notes while observing them from behind some glass. A woman comes to greet the Gladers. She tells them they have done well. She has a young boy with her. The boy is Gally. Gally draws a knife and throws it at Thomas. Chuck steps in front of the knife, giving his life to save Thomas. Thomas is crushed. He had promised Chuck he would find a way out and get Chuck back to his family. He attacks Gally, nearly beating the boy to death.
Suddenly, a group of rescuers storm the room and shoot the woman. They take the Gladers out of this facility and outside into a pouring rain where a large bus awaits them. As they are boarding a hideously scarred woman grabs Thomas and tells him that he is here to save everyone from the Flare. As Thomas and Teresa learn, the world has been ravaged by unprecedented solar flares and a disease known as the Flare has threatened humanity. Thomas gets away from the woman and on to the bus.
After two hours of driving the bus stops at a dormitory like building. Inside the Gladers find bunk beds with blankets, bathrooms, and food. They finally feel safe. Thomas drifts off to sleep feeling some hope for the future.
A memorandum from Ava Paige to her associates reveals that this has all been part of the plan for the Gladers. They have simply moved on to the next stage of their trials. The memo also reveals that there is another group of children who were also being put through this experiment. The goal of the experiment is to find those children intelligent and resourceful enough to find a way to defeat the Flare and save humanity.