The immortal psychic mutant En Sabah Nur rules ancient Egypt until he is betrayed by his worshippers, who entomb him alive. En Sabah Nur's lieutenants, the Four Horsemen, die protecting and preserving him. Awakening in 1983, and believing that without his presence humanity has lost its way, En Sabah Nur decides to destroy the world and remake it in his image. En Sabah Nur begins recruiting new Horsemen, beginning with Cairo pickpocket Ororo Munroe.
In Berlin, Raven Darkhölme, investigating an underground fight club, discovers mutant champion Angel, who possesses a pair of large feathered wings on his back, and the Nightcrawler, who can teleport. Raven rescues Nightcrawler and employs the services of underground black marketeer Caliban to safely transport him to the US. When En Sabah Nur then arrives to demand information about strong mutants from Caliban, Caliban's enforcer Psylocke sides with him and leads him to Angel, whose injured wings Nur replaces with metallic ones.
Meanwhile, Alex Summers takes his teenage younger brother Scott, whose own mutation for shooting optic beams from his eyes is manifesting, to Professor Charles Xavier's educational insitutute in Westchester County, New York, where Xavier and Hank McCoy will teach him how to control his abilities. Scott meets Xavier's protégé Jean Grey, and the two develop an attraction over the fact that they both cannot fully control their powers. Raven brings Nightcrawler to the institute, and informs Xavier about the threat of En Sabah Nur, leading Xavier and Alex to consult with Moira MacTaggert, who has been researching the legend of Nur, to learn more about him.
In Poland, the metal-controlling mutant Erik Lehnsherr lives with his new wife and daughter, Nina, but when authorities attempt to capture him for the incident at the White House, his family is killed in the crossfire. En Sabah Nur later approaches the infuriated Erik and takes him to Auschwitz, where he upgrades his powers. Erik destroys the camp and joins Sabah Nur, completing his new Four Horsemen.
En Sabah Nur hacks into Xavier's mind while he is using the mutant-locating computer Cerebro, and co-opts Xavier's powers to force all global superpowers to launch Earth's entire nuclear arsenal into space so it cannot be used against him. Nur and his Horsemen then arrive in the mansion and kidnap Xavier, and in attempting to stop them, Alex accidentally causes an explosion that destroys the entire mansion. Peter Maximoff—having learned that he is Magneto's son, and hoping that Xavier can help to find him—arrives in time to use his super-speed to evacuate the manision, but Alex dies in the blast. William Stryker's forces subsequently arrest Hank, Raven, Peter, and Moira, believing them to be involved in En Sabah Nur's attack, and take them to the Weapon X facility for interrogation. Scott, Jean and Nightcrawler covertly follow and liberate their comrades with help from Stryker's brainwashed experiment Logan, whose mind Jean partially restores.
At En Sabah Nur's behest, Erik uses his powers to control Earth's magnetic poles, causing widespread destruction across the planet and mass casualties. Following a telepathic distress call secretly sent by Xavier, the others arrive in Cairo and battle the Horsemen, managing to rescue the professor before En Sabah can transfer his mind into his body. Magneto and Storm are convinced to turn on En Sabah, and keep him occupied while Xavier fights him in the astral plane. Finally, he encourages Jean to unleash the full might of her powers against him. Letting go, Jean incinerates En Sabah with her unchecked power.
In the aftermath, Magneto helps reconstruct the school, but turns down Xavier's offer to stay and help teach. Scott, Jean, Hank, Ororo, Nightcrawler, Peter and Raven become the new "X-Men," and begin training for the battles ahead.
In a post-credits scene, the abandoned Weapon X facility is infiltrated by a paramilitary team that begins retrieving data on Stryker's mutant research, on behalf of the Essex Corporation.