Nile Valley, 3,600 B. C. The people of Egypt are bowing down and chanting the name of En Sabah Nur (the ancient Egyptian language for 'Apocalypse'), a powerful being. He is brought into his pyramid by his Four Horsemen - Pestilence (Warren Scherer), Famine (Rochelle Okoye), Death (Monique Ganderton), and War (Fraser Aitcheson). They are set to begin a process to transfer En Sabah Nur's consciousness into the body of a younger successor (Oscar Isaac).
As the sun hits the top of the pyramid, the process begins. Outside, the citizens of Egypt turn on their leader and send massive pillars sliding down into the pyramid to kill En Sabah Nur and the Horsemen. The Horsemen fight back against the other Egyptians as the pillars begin to destroy the pyramid. Death manages to form a protective shield on the successor before she and everyone else is crushed. The process is complete, but En Sabah Nur remains trapped beneath the rubble. We jump to Ohio in the year 1983. A high school classroom is discussing the events of 10 years earlier when Erik Lensherr/Magneto (Michael Fassbender) attacked the peace summit in Paris, and Raven Darkholme/Mystique (Jennifer Lawrence) stopped him. One student, Scott Summers (Tye Sheridan), complains that his eyes are hurting.
A classmate mistakes it as him winking at his girlfriend. The teacher tells Scott to report to the principal's office but he retreats to the bathroom and hides in a stall. The classmate enters and threatens to beat him. Scott then opens his eyes and releases a powerful blast that knocks the other kid against the wall and causes significant damage to the walls and ceiling. In West Berlin, a bunch of people are gathered in a secret location to witness the mutant Angel (Ben Hardy) fighting a large fat mutant (possibly Blob). After taking him out, Angel prepares for his next challenger. Some men bring in the challenger locked inside a box.
He is Kurt Wagner/Nightcrawler (Kodi Smit-McPhee). Nightcrawler is able to teleport as far as he can see, but within the cage where they fight is an electrical lining that prevents him from escaping. Meanwhile, Raven has made it in and she increases the voltage in the cage. Nightcrawler manages to take Angel down and pin him against the cage, frying Angel's wings. With Raven's help, Nightcrawler escapes the place.
Lensherr now lives in Poland under the name Henryk Gorzky. He works at a metal foundry and has a wife, Magda (Carolina Bartczak), and a daughter, Nina (T. J. McGibbon).
Erik tells Nina a bedtime story that he heard from his parents. She asks him what happened to them, and Erik explains how his parents were taken from him. Scott's brother Alex/Havok (Lucas Till) takes him to Xavier's School For Gifted Youngsters with bandages over his eyes to prevent another incident. Scott meets Hank McCoy/Beast (Nicholas Hoult), who is now a teacher, and then bumps into Jean Grey (Sophie Turner), a telepathic mutant. Alex brings Scott to Charles Xavier (James McAvoy).
Scott removes his bandages to hit a target, but he ends up splitting a tree that Charles's grandfather planted. Highly impressed, Charles says Scott is enrolled. Meanwhile, Raven brings Nightcrawler to a location where a mutant named Caliban (Tomas Lemarquis) is helping other mutants create fake IDs and passports. Nightcrawler gets his picture taken so that Raven can take him to the U. S. In Egypt, an archeologist named Moira MacTaggert (Rose Byrne) discovers a hidden underground chamber that leads to the resting place of En Sabah Nur. A group of his followers recite a chant that revives him in his fully powered Apocalypse form. The followers are buried by the ensuing explosion, while Moira manages to get out.
The explosion triggers an earthquake that can be felt throughout most of the continent and in Europe, including in Erik's workplace, where a large vat of molten metal falls and nearly crushes a man but Erik manages to manipulate it to save the man. At night, the students at school feel that something is wrong. Charles tells them all to stay in their rooms. He goes into Jean's room where he finds she's trembling and moaning. Charles looks inside her head and sees what she is dreaming of: she sees visions of chaos and destruction. Jean awakens and claims she saw the end of the world. She fears her powers, but Charles assures her that her power is great.
Back in Egypt, Ororo Monroe/Storm (Alexandra Shipp) uses her power of weather manipulation to create a brief sandstorm that allows her to rob two men. They chase after her, which Apocalypse sees after witnessing her power. He follows the men as they prepare to cut off her hand. Using his own power, Apocalypse decapitates three other men with sand, while he traps the last man within a nearby wall. Elsewhere, Erik tells Magda that they need to leave after feeling he has been exposed.
They call for Nina, but she is not in her room or in the yard. Erik hears a noise in the woods, which he and Magda follow. Nina is being held by an officer leading a group of other officers. They confront Erik regarding the incident at the factory, as well as his attack on the White House a decade earlier. He confesses to it and pleads for Nina to be let go.
She is released and goes back to her mother. Erik joins the other officers, but Nina yells at the men to not take her father away. The sound of her voice (she's a mutant) causes the birds flying up above to attack the officers. One officer with a bow and arrow accidentally releases it, impaling both Nina and Magda. Erik runs to his family and cries. He takes off Nina's necklace and uses as a high-powered projectile to kill all the men. Charles and Hank go to Cerebro to find out what happened with the earthquake. He locates Moira in Egypt, clearly still in love with her.
Charles and Alex take a trip to Langley at the CIA headquarters to visit Moira. She doesn't remember knowing Charles since he wiped her memories, but she still knows who he is. Moira explains that she was investigating En Sabah Nur's whereabouts and history, going into detail about his motives and followers, the Horsemen, and how he would give them special powers to aid him in destroying whatever they wanted. Ororo then brings Apocalypse to her home. She has a poster of Mystique, whom she considers to be her hero. Apocalypse places his hand on the TV to catch himself up on the last few thousands of years. Based on what he's seen, he determines that man has lost his way, and the world must be cleansed in order to be saved.
He places his hand on Ororo and gives her powers added strength. Raven brings Nightcrawler to the school. He meets Jubilee (Lana Condor), Jean, and Scott (who now has red-tinted crystal eyeglasses that help him see without hurting anyone). They decide to hang out at the mall and watch "Return of the Jedi. "Apocalypse and Storm then go to Caliban's facility to look for more powerful mutants. Caliban draws his gun on Apocalypse, but he turns it and the bullets to dust. As they step closer, Caliban is defended by Psylocke (Olivia Munn), a mutant with her own metal sword and a psychic katana. Clearly impressed, Apocalypse gives her an upgraded power.
Psylocke leads Apocalypse and Storm to their next recruit. They find Angel in an abandoned building, where he is drinking and blasting Metallica, clearly not the same fighter he was before. Apocalypse turns his wings into metal with bladed feathers. Peter Maximoff/Quicksilver (Evan Peters) is watching a news report on Magneto. His mother comes downstairs and he pretends to have been playing the video game Mrs. Pac-Man. She knows what he was really watching and why he was watching it.
Erik returns to the factory to confront his co-workers since they spoke to the police. He prepares to kill them all until Apocalypse, Storm, Psylocke, and Angel emerge. Apocalypse sinks the men beneath the ground and brings Erik to Auschwitz where he first used his powers and where he lost his family. Apocalypse encourages him to manipulate the metal in the earth, and to use his anger to fuel his energy. Erik begins to destroy the other buildings around him as Apocalypse vows to build a better world.
Charles brings Raven, Hank, Alex, and Moira down to Cerebro to locate Erik. Charles finds him as Magneto once again, now having joined Apocalypse and the Horsemen. As Magneto speaks to Charles, Apocalypse sees the opportunity to link his mind to Charles's, which also lets him get into Cerebro and connect to anyone he wants. Apocalypse manipulates officials around the globe to launch all of their nukes into space so that no one, human or mutant, can stop him. Charles is overwhelmed by Apocalypse's power. He orders Alex to destroy Cerebro, which he does. The others pull Charles out of the room, only to encounter Apocalypse and the Horsemen appearing before them. Magneto pulls Charles in his chair and takes him.
Alex releases a blast that causes a powerful explosion. Outside, Quicksilver arrives in time to do a power run through the school and evacuate everyone before the entire school is destroyed. However, he failed to save Alex, which Scott finds out about just as he and his friends return. He breaks down at the revelation. A chopper then descends to the ground. Moira approaches them, thinking they are part of another agency, until the leader steps out and removes his mask.
It's William Stryker (Josh Helman). His men fire a sonic blast that incapacitates everyone, except for Scott, Jean, and Nightcrawler. Jean manages to keep them hidden by manipulating the mind of one of Stryker's men. Stryker captures Raven, Moira, Hank, and Peter. Nightcrawler teleports himself, Scott, and Jean into their chopper, but he cannot get anyone out because of the electrical lining within. Stryker takes everyone to his facility and traps Moira and the mutants in a room. Hank has re-mutated to Beast since he left his meds at home. Scott, Jean, and Nightcrawler sneak by the guards until they are spotted, forcing Nightcrawler to teleport them again.
Simultaneously, Apocalypse brings Charles and the Horsemen to his old home and uses Charles to send a message to everyone on the planet, but Charles manages to get a hidden message to Jean to help her. In the cell, Peter admits to Raven that Magneto is his father, and he was hoping to be able to tell him. The three then come across a room with a chamber that has something locked up, angry and growling. As the guards approach, Jean opens the chamber, unleashing Weapon X... aka WOLVERINE (Hugh Jackman). He gets his metal claws out and slaughters all the guards until he reaches an exit.
Jean stops Wolverine and gently removes his brainwashing mechanism. She taps into his mind and gives him back the memories she could reach. Without a word, Wolverine retreats outside. The three then reach the cell, and Scott blasts the cell door open to release Moira and the mutants. Apocalypse destroys part of Egypt to recreate his own pyramid, and then gets Magneto to manipulate the magnetic poles to cause global destruction. Apocalypse then tells Charles he has the most important role in his plan. He wants to transfer his consciousness into Charles so that he can control everyone on the planet.
Moira and the mutants fly toward Cairo to rescue Charles and defeat Apocalypse. Raven tells the others about her old team, and how she and Hank are the only ones left. Jean tells Raven she's a hero, but she doesn't see herself that way. The team reaches Cairo for the showdown.
Beast and the young trio prepare for battle while Quicksilver and Raven (morphing into her natural Mystique form) head toward Magneto. She urges the trio to not hold back on their powers. Mystique and Quicksilver reach Magneto in the middle of his destruction, trying to convince him to fight for the good, with Mystique assuring him he has more family than he realizes. Quicksilver is about to tell Magneto of their relation, but he holds it back. Storm, Angel, and Psylocke come down and fight. Storm hurls lightning toward Scott, which he deflects with his beams. Psylocke uses her blades against Beast. Angel goes for a rematch with Nightcrawler.
Nightcrawler traps Angel and heads into the pyramid to get Charles out in the middle of the transfer process. They and the other heroes make it back into their jet, but Angel and Psylocke reach them and try to break in. Nightcrawler gets everyone out of the jet as it crashes to the ground, killing Angel while Psylocke jumps to safety. An infuriated Apocalypse catches Quicksilver as he uses his super-speed to get some punches in, but Apocalypse traps his foot in the ground and breaks his leg. He orders Psylocke to execute him. Psylocke uses her katana to slash Apocalypse's throat. He grabs her by the neck, revealing Mystique in disguise.
Storm watches as Apocalypse is killing her hero. The others are in a building for safety. Charles realizes he is still connected to Apocalypse and decides to fight him in their shared consciousness. Charles initially appears to have the upper hand, but Apocalypse overpowers him and starts trying to kill him.
Magneto then turns on Apocalypse after realizing what side he's meant to fight on. As he holds Apocalypse off, Charles reaches Jean and gets her to tap into the fight with her mind. She manages to unleash her full Phoenix Force power to overwhelm Apocalypse. As he weakens, he tries to escape, but Storm uses her lightning to prevent him for leaving. Apocalypse's form deteriorates until he is finally disintegrated. After the battle, Psylocke quietly walks away. The team returns home.
Erik and Jean help rebuild the school to its original form. Ororo asks Peter if he'll tell Erik he is Erik's son. He says he will eventually. He and Ororo decide to stick around. Although Charles asks Erik to stay, he chooses to leave, but he remains friends with Charles. Charles then goes to the Danger Room where Mystique is about to train Scott (now Cyclops), Jean, Storm, Quicksilver, and Nightcrawler into becoming true X-Men. A simulation then begins in which the students must battle Sentinels.
After the end credits, a team of agents are at Stryker's facility. One man takes a sample of Wolverine's blood and puts it in a briefcase... which belongs to the Essex Corporation.