Onslaught

Onslaught was a 1996 Marvel Comics Crisis Crossover involving nearly every superhero comic book they published at the time. The X-Men, Avengers, the Fantastic Four and other heroes fight an incredibly powerful Omnicidal Maniac which results in the "deaths" of every hero involved (except the mutants).

The X-Men suffer several attacks by minions of the seemingly omnipotent entity known only as "Onslaught", who appears to know them well. He is also the one behind the recent stealing of the Sentinel fleet from a government base. When Gambit and Jean Grey go undercover to learn more about an unrelated Government Conspiracy, they are exposed but get an unexpected help from Onslaught. Later he tries to bring Jean over his side by showing her the dark long-repressed thoughts of her mentor Charles Xavier. She refuses. Juggernaut, who was attacked by Onslaught as well, comes to the X-Mansion and asks Jean to look for its true identity inside his head. She does and finds out that Onslaught is none other than Professor X.

It turns out that when Xavier brainwashed Magneto several months before (to cause him to stop being a threat after he cruelly stripped the adamantium off Wolverine's bones), a part of the latter's psyche merged with his own mind. Under the stress of constant failures and new misfortunes the Professor became more and more frustrated, until he developed a split personality, which eventually took a life of its own and was able to manifest in the corporeal world. Onslaught nearly kills the X-Men before leaving to capture Franklin Richards and X-Man in order to suck out their powers and become a living god. That brings him into conflict with both the Avengers, who were approached by X-Man, and Franklin's family, the Fantastic Four. Despite that Onslaught successfully kidnaps both of his targets, encircles Manhattan with Sentinels and prepares to Take Over the World.

The heroes (and Doctor Doom) eventually manage to defeat him but in order to do that most of them have to enter his non-corporeal form, which the X-Men then have to destroy, making it look like they killed them. Professor X is imprisoned for Onslaught's crimes and the anti-mutant sentiments become stronger than ever.

(Unknown to anyone, the heroes survived as they were recreated -by Franklin's powers- in another world, with no memory of their previous lives, as seen in the sequel "Heroes Reborn".)

Tropes used in Onslaught:

 * A Darker Me: What happens when the dark sides of Xavier and Magneto combine.
 * A God Am I: Onslaught at one point actually calls himself a god.
 * All There in the Manual: X-Men: The Road to Onslaught, a special comic that told the backstory of Onslaught in chronological order.
 * A Wizard Did It: Though other mutant heroes couldn't enter Onslaught's field (they'd get possessed) the Avenger's Scarlet Witch was able to make an exception for herself with her powers.
 * Brought Down to Normal:  who lost his powers afterwards.
 * Capcom vs. Whatever: Onslaught served as the final boss of the first Marvel Vs. Capcom game, where he was the resident SNK Boss.
 * Did You Just Punch Out Cthulhu?: The Hulk literally punched Onslaught so hard that he destroyed his physical form.
 * Onslaught punched him back hard enough to knock Bruce Banner out of the Hulk.
 * Enemy Within/Enemy Without: Xavier's evil side had already manifested in physical form once before in the X-Men vs Micronauts series.
 * Evil Tower of Ominousness: Onslaught created one in Central Park.
 * Forgot I Could Fly: Magneto has limited telepathic powers of his own, it was likely because of this that the mindwipe backfired. He just rarely uses them these days.
 * Heroic Sacrifice: the heroes' (Doom was dragged along involuntarily.)
 * Humans Are Bastards: The original motivation of Onslaught was to Kill All Humans for their oppressing of mutants. Then he saw the world X-Man came from and decided that mutants are bastards too.
 * Literal Split Personality: Onslaught and Xavier, as well as Hulk and Banner at the end.
 * Mecha-Mooks: Sentinels.
 * Omnicidal Maniac: See above.
 * Red Skies Crossover: Wolverine # 103 was labeled as tie-in but had no connection whatsover.
 * Super-Powered Evil Side: While Xavier is one of the world's most powerful telepaths, Onslaught also had telekinesis and magnetism.
 * Trailers Always Spoil: The Heroes Reborn line was advertised on the covers of Onslaught issues.
 * The Worf Effect: Early on Juggernaut got beaten up by Onslaught to establish him as a big threat. It was before writers made up their minds about just anything else of him.
 * It becomes unintentional Fridge Brilliance after The Reveal of Onslaught's identity: If you become evil and all-powerful, one of your first targets would be the invincible-til-now man who has bullied and tried to kill you from childhood to the present day.