Avalon and Genosha
Tired of the constant strife, Magneto rebuilds his orbital base and retires to a life of quiet seclusion. At this point, he is a figurehead for the cause of mutantkind and is sought out by a group of mutants calling themselves the Acolytes, who pledge their service and allegiance to him. Under the influence of one of them, Fabian Cortez, he declares Asteroid M a homeland for mutantkind, obtaining nuclear missiles from a Soviet submarine he had previously destroyed and placing them around the asteroid pointed towards Earth.
Magneto discovers how Moira MacTaggert altered his genetic structure when he was de-aged. Enraged, he kidnaps Moira and subjects her to torture, later forcing her to use the same procedure that was used on him to alter the minds of some of the X-Men. However, when the remaining X-Men attack Asteroid M to rescue Moira and stop Magneto's plans, the Soviets launch a particle beam satellite that destroys Asteroid M and the procedure wears off; Moira had learned long ago that her procedure did not work because a mutant's natural physiology relies on their bodies operating in a precise manner, with use of their powers restoring them to normal, and so Magneto had genuinely reformed. Betrayed and abandoned by Cortez, who had revealed Moira's actions to him to try and provoke Magneto into bringing mutants together to serve as a martyr for Cortez's own cause. Magneto refuses Xavier's pleas to escape with the X-Men back to Earth. Instead, the Acolyte Chrome encases him in a protective shell, saving him from the subsequent explosion. However, Chrome and the other Acolytes die.
The United Nations Security Council, in response to a resurgent Magneto, votes to activate the "Magneto Protocols" — a satellite network, in a slightly lower orbit than Avalon, that skews the Earth's magnetic field enough to prevent Magneto from using his powers within, preventing him from returning to the planet's surface. In response, Magneto generates an electromagnetic pulse not only destroying the satellites, but deactivating every electric device on Earth within minutes. The X-Men respond by hacking into Avalon's own computer systems to teleport a small team to the station with the aid of Colossus (who joined Magneto's Acolytes moments after his younger sister Illyana's funeral). Magneto, during the battle with the X-Men, rips the adamantium from Wolverine's bones, which enrages Xavier to the point that he wipes his former friend's mind, leaving him in a coma. This action later leads to the creation of Onslaught, an omnipotent being formed from the combination of Xavier and Magneto's own dark sides, the darkness in Magneto's soul latching on to its counterpart in Xavier when he launched such a devastating assault. Magneto remains comatose on Avalon, worshiped by his Acolytes under the leadership of the ancient mutant Exodus, until Avalon itself is destroyed by the arrival of Holocaust from the Age of Apocalypse Earth. During the destruction, Colossus places Magneto in an escape pod sending him back to Earth. This pod is intercepted by Astra, a former ally who now desires his death.
After cloning Magneto, Astra restores Magneto's memories and powers before attempting to kill him. Instead, Magneto, now fully revived, battles both Astra and his clone. Magneto triumphs over the clone, sending him crashing into a South American barn. However, too weak to continue the battle, the real Magneto goes into hiding, while the now-amnesiac clone becomes known as Joseph (christened as such by the nun who discovered him) and eventually joins the X-Men. Since the world believes Joseph to be the real Magneto, Magneto takes his time to plan. He engages in a pair of brief diversions, first posing as "Erik the Red" and revealing Gambit's past crimes to the X-Men, resulting in Gambit's expulsion from the group. Then he kills George Odekirk, the forger that created his "Erik Lehnsherr" alias, to prevent his true identity from being discovered by Sabra and Gabrielle Haller.
Following this, Magneto constructs a machine to amplify his powers and blackmail the world into creating a mutant nation. The X-Men and Joseph, who had fallen under Astra's control again, oppose him. Magneto's powers are severely depleted from battling Joseph, who sacrifices his life to restore the Earth to normal. However, the United Nations, manipulated by its mutant affairs officer Alda Huxley, cedes to Magneto the island nation of Genosha, which had no recognized government. He rules Genosha for some time with the aid of many who had previously opposed him, including Quicksilver, Polaris, and Fabian Cortez, and engages in a brutal civil war with the island's former human rulers.
Despite the UN's hopes that Genosha's civil war between humans and mutants would destroy or at least occupy him, Magneto crushes all opposition to his rule and rebuilds the nation by forming an army of mutants dedicated to his cause, including mutants coming from all over the world seeking sanctuary. Eventually, Magneto uses the Genegineer's equipment to fully restore his power. Intending to declare war on humanity, he captures Professor X to use as a symbol with which to rally his troops. Jean Grey recruits a new group of X-Men to help Cyclops and Wolverine rescue Xavier; they defeat Magneto when Xavier psychically cuts off his access to his powers. Taking the opportunity for revenge, Wolverine attacks the depowered Magneto, crippling him with serious injuries.
While Magneto recovers from his injuries, Genosha is attacked by an army of Sentinels sent by Xavier's long lost twin sister Cassandra Nova Xavier. Over 16 million mutants and humans die. The attack comes just after Polaris (one of the survivors) discovered the truth about her biological relationship as Magneto's daughter. Magneto's supposedly last moments are spent revealing to Genosha Polaris' status as his daughter.
Charles Xavier is met on Genosha by Magneto, who apparently survived Cassandra Nova's attack and lived unnoticed within the ruins. Xavier and Magneto put aside their differences to rebuild the island nation, rekindling their friendship in the process.
During the House of M storyline, Magneto's daughter Wanda suffers a mental breakdown over the loss of her children and starts to warp reality to recreate them, until Doctor Strange put her into a coma to stop her. In Genosha, Magneto hears Wanda's psychic cry for help and creates a wormhole, whisking her away before the Avengers are able to stop her. Magneto tends to Wanda, increasingly becoming more withdrawn and angry. He allows only Xavier to visit, in the belief that Xavier can help Wanda. After months of failed attempts, the X-Men and the Avengers meet to decide what should be done. When some of the members suggest killing Wanda, Quicksilver informs Magneto of this development, before convincing Wanda to warp reality into the House of M. In the new reality, where the New Avengers, the X-Men, and the members of Wanda's family all received their 'heart's desires', Magneto was attacked by Sentinels over Manhattan in 1979, and revealed an alleged international anti-mutant conspiracy involving Richard Nixon. This resulted in Magneto being granted sovereignty over Genosha as leader of the world's much larger and much faster growing mutant population. Magneto then turned Genosha into the most powerful, technologically advanced country on Earth, which he used as a base to dominate the world and place mutantkind above humanity.
A group of heroes is brought together by Wolverine — who alone remembers the way the world is supposed to be because his 'heart's desire' was to regain all the memories stolen from him by the Weapon X Program — and have their own memories of the "real world" restored by Layla Miller. They band together and attack Magneto in Genosha, believing him to be the one responsible. During the battle Layla is able to restore Magneto's memories, and he confronts his son. Enraged that Quicksilver had done all of this in his name, Magneto kills him. Sensing her brother's death, Wanda resurrects him and retaliates with the phrase "No more mutants", changing the world back to its original form and causing ninety-eight percent of the mutant population to lose their powers, including Magneto. Magneto is left a broken man.
In the 2006 miniseries Son of M, which follows up "House of M", when Quicksilver comes to Genosha to restore the mutants' powers with the Inhumans' Terrigen Mists, Magneto condemns his actions, pointing out the disastrous effects the Mists have on non-Inhumans. Quicksilver attacks Magneto with his new powers from the Mists and savagely beats him until his daughter Luna stops him.
Marvel's editor in chief at that time, Joe Quesada, elaborated on the issue of Xorn and Magneto, stating that "Kuan-Yin Xorn came under the influence of as-yet-to-be-revealed entity that forced him to assume the identity of Magneto." However, the issue of Xorn and Magneto was ultimately resolved during "The Collective" arc in New Avengers. A powerless Magneto is attacked by Xorn, who has somehow evolved into a being of pure energy and merged with both an energy-absorbing mutant named Michael Pointer and free-floating mutant power energy that manifested after Scarlet Witch depowered the bulk of the mutant population. Xorn reveals that he, of his own free will, impersonated Magneto to rally mutantkind against humanity but failed due to the quality of his impersonation. He possesses Magneto and briefly reactivates his powers before being defeated by the New Avengers and a cadre of heroes, including Magneto's former son-in-law Vision and Inhuman S.H.I.E.L.D. agent Daisy Johnson. Iron Man, Ms. Marvel, and Sentry combine their powers and send Xorn into the Sun. Michael Pointer and Magneto are freed as a result, though Magneto is arrested and loaded into a S.H.I.E.L.D. helicopter. The helicopter, however, explodes upon take-off through unknown means as Magneto uses what was left of the energy provided to him by Xorn to escape.