At a German concentration camp in occupied Poland in 1944, young Erik Lensherr is separated from his parents by Nazi guards. The child’s desperate mind remarkably bends a metal gate until a guard knocks Lensherr unconscious. A scientist, Dr. Schmidt who has observed this through a window calls Lensherr up to see him. Placing a metal coin on a desk, he orders Lensherr to use his magnetism power to move it. When Lensherr cannot, despite his best efforts, Schmidt shoots and kills Lensher’s mother in front of him. In his rage, Lensherr’s out-of-control magnetic power kills the two guards and destroys two rooms, to the scientist’s delight. Around this same time, in a Westchester County, New York mansion, a young Charles Xavier meets a young, shape-shifting girl named Raven, scrounging the food in the kitchen. Overjoyed to meet someone else “different” like him, he invites her to live with his family.
In Switzerland in the movie’s present-day of 1962, Lensherr forces a banker to trace a bar of Nazi gold to the scientist’s address in Argentina. There he finds a tavern patronized by former German soldiers. Lensherr kills the three men after he learns that the scientist has a yacht in Florida. Meanwhile, in England, Oxford University graduate Xavier is publishing his thesis on mutation; his foster sister Raven, a waitress, lives with him. Simultaneously in Las Vegas, Nevada, CIA agent Moira MacTaggert follows U.S. Army Colonel Hendry into the Hellfire Club, where she sees Sebastian Shaw, Emma Frost, and Azazel. After Shaw threatens Hendry, Azazel disappears with the officer; moments later he is in the War Room, advocating that U.S. install nuclear missiles in Turkey. Shaw later kills him, demonstrating his energy-absorbing mutant power and revealing that he is Schmidt, de-aged.
MacTaggert seeks Xavier’s advice on mutation, and introduces him and Raven to the CIA, where they convince her chief that mutants exist and Shaw is a threat. Xavier tracks him down as Shaw escapes a battle with Lensherr, whom Xavier brings to a secret CIA science facility run by an unnamed agent (called the Man in Black in the movie’s credits). They meet young scientist Hank McCoy, a prehensile-footed mutant whom Xavier inadvertently outs. McCoy and Raven feel a kinship, and McCoy promises her he will find a way to make them look “normal.” Xavier then uses a computerized mutant-locating device, Cerebro, to find and recruit mutants for training to stop Shaw. They find Angel Salvadore at a strip club; Armando Muñoz, who will take the code name Darwin, driving a taxi; Alex Summers, who will call himself Havok, confined at an Army base; and Sean Cassidy, who dubs himself Banshee, at an aquarium. Raven takes the name Mystique. Xavier and Lensherr also attempt to recruit Wolverine, who rejects them.
Shaw plans to meet with a Russian general, but instead sends Frost, whom Xavier and Lensherr capture. Meanwhile, Azazel, Riptide and Shaw attack the CIA facility, killing everyone but the young mutants and offering them the chance to join him. Angel accepts. Darwin tries to rescue her as the others attack in vain, and Shaw kills him. With the facility destroyed, Xavier take Lensherr and the youngsters to his family mansion, where they train. McCoy devises protective uniforms and a stealth jet. Xavier helps Lensherr unlock his potential.
President John F. Kennedy institutes a blockade to stop a Russian ship from moving nuclear missiles to Cuba in the real-life Cuban Missile Crisis. Shaw travels with the Russian fleet to ensure that the missiles arrive, knowing it could trigger World War III, after which mutants will rule. The night before Xavier and the others go to the blockade line to stop Shaw, who will undoubtedly be there, McCoy offers Raven his cure for her appearance. After having spoken with Lensherr about mutant pride, she refuses. McCoy, in his lab, injects the cure, which backfires and renders him a hairy, leonine beast. Regardless, he pilots the mutants and MacTaggert to the blockade line. Shaw, in a submarine wears a custom made helmet to block Xavier’s telepathy — which Xavier uses to have a Russian ship destroy the missile freighter. After Banshee locates Shaw, Lensherr pulls Shaw’s submarine from the water, but an attack from Riptide forces the jet and submarine to crash.
While the other mutants fight, Lensherr finds Shaw in a psychic blackspot within the sub’s wreckage of his submarine. He removes Shaw’s helmet, allowing Xavier to take control of Shaw. Lensherr puts on the helmet, then kills Shaw by forcing the concentration-camp coin through his brain.
The two fleets fire their missiles at the mutants, but Lensherr turns the missiles back onto them. In an ensuing fight, Xavier distracts Lensherr and neutralizes the missile threat. MacTaggert fires at Lensherr, who deflects the bullets; one accidentally hits Xavier in the spine, paralyzing him. Lensherr, remorseful, leaves with Mystique, Angel, Riptide and Azazel. Later, a wheelchair-bound Xavier and the mutants return to the mansion, where he will open a school. Xavier wipes MacTaggert’s memory of recent events. Lensherr breaks Frost from confinement, and in his new uniform tells her to call him Magneto.