Erik Lehnsherr, also known as Magneto, is a character primarily portrayed by Ian McKellen and Michael Fassbender in 20th Century Fox's X-Men film series. Based on the Marvel Comics character of the same name, he has appeared in eight installments of the franchise. McKellen played Magneto in the original trilogy films X-Men (2000), X2 (2003) and X-Men: The Last Stand (2006), in addition to making a cameo in The Wolverine (2013); while Fassbender portrayed a younger version of the character in the prequel films X-Men: First Class (2011), X-Men: Apocalypse (2016) and Dark Phoenix (2019). Both actors' iterations appeared in different time periods in X-Men: Days of Future Past (2014).
As in the comics, Magneto is depicted as a powerful mutant, a fictional subspecies of humans born with superhuman abilities, who can manipulate and generate magnetic fields. He is a Holocaust survivor who regards mutants as being superior to humans, and seeks to enable them to replace mankind as the dominant species on the planet.
Magneto (Marvel Comics)#Fictional character biography
Erik Lehnsherr was born in 1930. Lehnsherr's parents were Jews from Düsseldorf, Germany. During the Nazi regime, the family is taken to Auschwitz concentration camp, where Lehnsherr, then a boy, is separated from his parents, causing him to manifest his mutant power and bend the metal gate separating them until the Germans knock him unconscious. Shortly thereafter, the boy is taken to the office of Dr. Klaus Schmidt in the camp. Schmidt, who had observed Lehnsherr's earlier display, attempted to coerce him to demonstrate his power by having him move a coin. When Lehnsherr is unable to do it, Schmidt has Lehnsherr's mother brought in, and when that does not produce results, Schmidt shoots and kills her. This triggers Lehnsherr to use his powers to crush metal items in the room, killing the German guards by crushing their helmets, and destroying an adjacent laboratory room.
After escaping the horrors of Nazi Germany, the young Erik Lehnsherr emigrates to the United States at some point, arriving at Ellis Island.