The occasional writer has portrayed X-Men's Magneto, typically portrayed since the 70s as Well-Intentioned Extremist, as a loony terrorist who is interested only in racking up as high a body count as superhumanly possible. In fact, Magneto probably goes through more (and more varied) character derailments than possibly any other non-main-character in the MU.
Writer Grant Morrison tried to defend his decision to make Magneto a raving drug-addict who rounded humans up into death camps by saying that "What people often forget, of course, is that Magneto, unlike the lovely Sir Ian McKellen, is a mad old terrorist twat. No matter how he justifies his stupid, brutal behaviour, or how anyone else tries to justify it, in the end he's just an old bastard with daft, old ideas based on violence and coercion. I really wanted to make that clear at this time."
Neither the fans nor the other writers were convinced by Morrison's explanation, and the latter group very quickly retconned the story. Despite the overly convoluted result (the whole thing was Xorn pretending to be Magneto pretending to be Xorn. Oh, and there's more than one Xorn), this is generally considered (barely) preferable to letting Morrison's characterization of Magneto stand. It should be noted that Magneto, as originally written, was indeed an anti-human terrorist—it was his transformation into a baby (by his own creation, Alpha the Ultimate Mutant) and his later being aged up again, that cured him of his more extreme tendencies. So Morrison was right in his assessment of him— he just failed to consider all the character development Magneto had since then, or did not properly explain the reversion beyond the influence of alien mind control spores.
It also bears noting that in the 60s, while Magneto's sympathetic backstory had yet to be written, he was a generically evil villain as opposed to being in it only because he's kill-crazy. Even in the days of The Comics Code, he could have tried to do what Morrison's Magneto did but simply been prevented, but he actually passed up many opportunities for puppykicking. He felt mutants should rule the world because mutants are more awesome, and so your average Magneto issue involved him trying to recruit the latest newly-discovered mutant and calling Toad a dolt a lot. And then the 70s come along and he grows into the Magneto we've known for the past 40 years. While other writers have had trouble balancing the "well intentioned" part and the "extremist" part, Morrison's Magneto is Morrison's alone, and when that's coupled with his statement, it really seems to be a Take That against a character he personally saw as a Draco in Leather Pants.
Of course, complicating the issue, Magneto is undeniably hit with Draco in Leather Pants appeal, causing people to overlook his numerous pre-supposed derailment attempts to provoke a war between human and mutant-kind, the fact that he literally ripped the adamantium out of Wolverine's body and sent the whole of earth into a dark age with an EMP during the "Fatal Attractions" storyline, or, in "Eve of Destruction" the storyline right before Morrison's run, features Magneto crucifying Professor X, forcibly conscripting mutants into Genosha's army by threatening their families, and attempting to slaughter the X-Men en route to declaring a war of extermination on humanity.
Special mention must go to his sudden reappearance in Uncanny X-Men #500. Not only does he show up and attack the X-Men with apparently nothing resembling a plan or motives (something ill befitting a character who's always been best portrayed as a Well-Intentioned Extremist), but it's revealed that not only was he taking orders from the High Evolutionary, he was actually using a mechanical device to replace his lost powers, something a proud believer in mutant supremacy over the "inferior" humans would never do. Compare his appearance in X-Men Legacy, mere months earlier, where he was portrayed as having no loss of dignity or pride whatsoever post-depowering, and even managed to beat his still-powered former Acolytes without any powers at all, in defense of Xavier. All the while refusing to concede to his former second-in-command's claim that as a human he was no longer the worthy leader of the Acolytes he once was.
He's used tech to bolster his powers before.
This was because his attack was a distraction for High Evolutionary, who gave him (after their plan worked out) back his mutant powers. So this was just Magneto doing what he must to become once again what he once was. Next time we see him in the series he arrives at a funeral and submits himself to Cyclops, who is one of his main enemies.
It may bear noting that Magneto's first attack using his power suit happened in issue # 500. It was meant to be a special landmark issue, and it had tons of stuff tacked onto it for no other reason than simple nostalgia: an early scene had the team stumbling into an X-Men themed costume party that showcased about a hundred past and present X-Men in all of their various costumes, and the main plotline involved them duking it out with Magneto and two classic-design Sentinels at the same time (because Magneto and the Sentinels are the two most iconic villains in the X-mythos). It was meant to be a light-hearted break from all the high drama following the events of Messiah CompleX, and a fond look-back at 500 issues of X-Men. Some dramatic license was to be expected.
Joseph the Clone was a very different example of a Magneto derailment that just didn't work. Originally, Joseph was a younger, regenerated Magneto, but he was so much of a loser that he was retconned into a clone... which was rather pointless given that for almost his entire existence, it was hinted that Joseph could easily revert to villainous form if he ever fully recovered the memories of his previous life. Given how overdone clone plotlines are in the Marvel Universe in general and X-Men in particular, that would've been a better and simpler way to go.
If you want to keep an X-Men fan happy, don't talk about the way Storm's being written in Black Panther. Having her declare her strong love for one of Marvel's few other black characters out of Reginald Hudlin's desire to get a Token Romance going snag a hot black babe for his badass black Canon Sue was bad enough. Throwing away most of the strong characterization that made her a leader of the X-Men many times over to turn her into a love-struck woman whose major concern is her marriage and her husband? (At least she's back with the X-Men, having grown bored with queening.)
Not to mention that Storm is someone who was once so into female empowerment that she defied all stereotypes by getting a mohawk... and is now content to play the good wife to a man who is still keeping his royal harem. Or that she once berated Dr. Doom for the sheer amount of helpful technology he was keeping from the world, but seems perfectly content to let Black Panther hoard every bit of technology, including cancer cures, from everyone that's not Wakandan. Would "pot and kettle" be a little too edgy a punalogy to invoke?
Getting the Mohawk (or rather, the entire makeover and outlook change more notable for including the Mohawk) was, itself, a moment of pretty massive character derailment, though at least her teammates (especially Kitty) pointed this out and an attempt was made to explain it (even if it basically amounted to "spent the night partying with a free spririt and liked her style").
Though this did happen after the Brood storyline where Storm, who until that point had been a pacifist, decided she had to kill. She went through a period of soul-searching before the Mohawk and accompanying badassness, making this change arguably Character Development rather than Character Derailment.
Another thing to keep in mind is that Storm has a long romantic history with Forge, which left Storm a bit damaged in the relationship department after he backed out of his own marriage proposal. To Black Panther's proposal, she just says 'Yes'.
Not to mention, the "Wedding of the Century" Story Arc ripped Storm right out of the X-Men with little to no preparation - she went from a successful leader of an independent band of heroes, having the government approval to kick the ass of any supernatural threat and all but in an actual relationship (with Wolverine, of all people) to being pretty much everything mentioned above.
Also, speaking of Wolverine, notice how he's being treated in Hudlin's writing. You'd think that man's trying to compensate for something...
And as a final kick in the gut, seeing Storm as the ultimate heroes-do-not-kill person say "Stand down or be destroyed" to a mob of civilians is rather painful.
With Scott Summers, a.k.a. Cyclops of X-Men, it's hard to decide where to begin. First off, Cyclops had always been a more or less admirable hero, and the contrast to, say, Wolverine (the X-Men's resident Anti-Hero during the 80s). Aside from that, he was romantically involved with Jean Grey until her death in the Phoenix Saga. Since Jim Shooter wouldn't allow them to bring her back as a mass murderer, Madelyne Pryor was used as a substitute and he married her. When Jean is back to life, Cyclops goes to see it for himself and gets caught up in the X-Factor team with the rest of the original X-Men, something which has been used by his detractors to label him a "deadbeat dad". Whilst questionable, Scott kept distance from Jean and when he checked back with his family, they were gone (A Retcon a few years later says he did this due to Mr. Sinister's mind control, but still.) The baby was eventually sent into a Post Apocalyptic Future and grew up to become Cable. Madelyne, meanwhile, went with the X-Men to Australia, and then suffered Character Derailment of her own, eventually changing from a noble and courageous young woman to an evil psychotic. From there, she became one of the principal villains in the Inferno crossover, and then was killed off. Scott fortunately didn't marry Jean until years after that (despite what some trying to demonize their relationship claim). This lasted until his further derailment during Grant Morrison's run on New X-Men, where, after he had recently been resurrected from being merged with Apocalypse, Cyclops' relationship with Jean decayed, he ended up being the target of Emma Frost's (who herself was derailed into a Spoiled Brat, when she spent the 90s as The Atoner) affections, who abused her position as Scott's therapist to have a psychic affair with him; all of this is typically overly simplified into "Cyclops cheated on Jean with Emma". Jean is then unceremoniously killed again, after which Cyclops considers leaving the team after rejecting Emma. However, it is revealed that this would cause an apocalyptic future, which can only be prevented (in an absurd Deus Ex Machina) if Scott and Emma end up together. This in turn leads to future Phoenix going back in time and psychically manipulating Cyclops to get together with Emma, which depending on YMMV, could be considered forcing him into a relationship with a previous abuser, which of course is also overly simplified into "Cyclops made out with Emma at his dead wife's grave". Then after the mutants are depowered, he's now "suddenly" willing to kill his enemies off.
And fire Professor Xavier.
That's supposedly justified because of the things Xavier has done, except those things themselves are derailment. He's been turned into a Magneto-esque "I'll run over anybody for my good cause and you're supposed to forgive me because I look sad for a panel or two when called on it" sort of character. Among the things he's been Retconned as doing: The Danger Room was sentient and he deliberately left it in And I Must Scream condition rather than go back to the previous version? And using Mind Rape to cover up his recklessly assembling and losing a half-trained second team between the original X-Men and Storm, Wolverine, and company.
Forge in the recent "Ghost Boxes" arc of Astonishing X-Men, written by Warren Ellis. Suddenly for no particular reason Forge is completely insane and decides to save the Earth from extra-dimensional invaders by... sending his friends to the other dimension and then killing them. And then Beast and Agent Brand blow up the other world with a laser after Forge just goes "Screw it." and opens up the Ghost Box risking all life on Earth. And then he whines to Storm for rejecting him and stays in his complex as it blows up. Character Derailment isn't a strong enough term for what happened to Forge.
Ellis, he was not very familiar with X-Men story and asked Marvel editors for help. They gave him a bunch of comics. The problem is that in most of them Forge's mental shape wasn't at his best. We can assume that Ellis didn't do his homework, but really wanted to. Though, even during those issues Forge wasn't anywhere near that crazy, so some of the blame still falls on him.
In Ellis' Astonishing X-Men, a much bigger character derailment happens with practically the whole team. In previous stories, the X-Men (like most Marvel superheroes) had always tried to avoid killing their enemies, using lethal force only if there was no other option. However, in Ellis' X-Men the team has suddenly adopted a different morality, so they find it okay to murder a villain even after he's been defeated and poses no threat to them. Even worse, in Astonishing X-Men #30 the X-Men have no problem with firing a massive laser through a dimensional portal into an alternate Earth. According to Beast this laser destroys everything within a 10 mile radius, presumably killing a whole lot of people. The reason for this rather brutal display of power? Beast assumes (but doesn't know for sure) that this alternate Earth is a corrupt one, populated by evil mutants. So it's perfectly possible the laser might've killed lots and lots of innocent people, not just some bad guys. Talk about questionable morality! Ironically enough, the only character to protest against this new stance on killing is Storm, even though in Uncanny X-Men #170 (where Storm duels with Callisto to save Angel's life), #216 (where she is ready to kill Crimson Commando and order the death of Stonewall at the hands of Wolverine, and is serious about it), and #325 (where she stops Marrow, by ripping out her heart; Marrow was revealed to have two hearts and came back), she was shown as the only X-Man capable of killing cold-bloodedly in order to save the life of a team member.
#170 was an exception, not the rule; and could in fact be considered Character Derailment itself.
Also happened in Nextwave, due to Rule of Funny. Ellis intended for Nextwave to be Non Canon, but it ended up being so popular writers have tended to Canon Immigrate the changed characterizations.
Even Chris Claremont may be guilty of this — his X-Men: Die by the Sword has Merlyn teaming up with Mad Jim Jaspers to kill his daughter and take over The Multiverse, despite that, while being a Manipulative Bastard, Merlyn was always concerned about the good of The Multiverse and almost died to save it from Jaspers. Even when it was later revealed he faked his death and was manipulating people from the shadows, he was still doing this for the greater good; in this series, however, he is just plain evil and mad. Paul Cornell had solved this problem by claiming Merlyn went insane and having his body hijacked by one of his alternate selves (Merlyn was the nexus of all Merlins in The Multiverse), who happened to be from Marvel's Doctor Who comics.
All of the original New Mutants team has suffered from this at one time or another since leaving the book; particularly noticeable with Cannonball (from competent team leader and commando to "Golly, shucks y'all" junior member on X-Men) and Sunspot (hot-blooded but good-natured brawler to occasional goofy-ass moron).
Rahne got one in the second New Mutants series, losing her trademark accent and becoming a bad-ass biker-girl who made out with a student at Xavier's. Old-school fans were not impressed, and the derailed character was removed from the book quickly, and brought back to her old self elsewhere. Canon Discontinuity at its most extreme.
Bishop was given one of truly epic proportions. At the end of Messiah Complex storyline he betrayed X-Men and his whole reason for living suddenly became killing a newborn mutant girl because he thinks her to be the antichrist who destroyed his home future. Despite the fact that it went right against his whole previously established history where in his timeline X-Men died in battle with Onslaught and House of M didn't happen.
Grant Morrison's derailment of Emma Frost. She was not a Spoiled Brat who manipulated others just because of some issues she had in her past. She was manipulative as a villain because of her ambition and callousness. Yet it turned out she wasn't beyond caring when finding out what happened to her students, after she came out of a coma, and that put her nearly in the Despair Event Horizon. Then she became The Atoner. Morrison basically ignored all that, and even had her being a sex therapist, despite her profession of being a teacher.
While her change in personality could be justified by her witnessing Genosha's massacre and spending several days buried alive, in-story it was never brought up and later writers treated her as if she has always been like this and her Atoner periodseems to be forgotten entirely. "Sex therapist" is a complete Ass Pull though.
What makes it worse is when you realize exactly what a sex therapist is. She essentially convinced Cyclops, who was in fact experiencing a mental breakdown from his time possessed by Apocalypse, that the best way to deal with his issues is to sleep with her. That, as well as being absolute bullshit, is highly illegal and would be classified as rape. Yet, instead of being punished for taking advantage of her position and Cyclops' mental state, her actions are handwaved because she loves him (as per Rape is Love) apparently, and she ends up as co-headmistress of the school and co-leader of the X-Men. It's sickening especially when you know how she used to be.
Even their alternate versions aren't safe from this. When Ultimate X-Men changed writers to Vaughan, most characters practically became clones of their main universe selves. Professor Xavier was the most heavily affected, suddenly claiming that he would never read anyone's mind without permission, while previously, he read minds for fun.
The Juggernaut has gone through some weird times. Him connecting to kids in Chuck Austen's run could be seen as Character Development, but acting like a mopey teenager and enduring endless verbal abuse from other X-Men without any comeback is less so. Heck, in the first story by Austen to feature Juggernaut, he is willing to commit (non-heroic) suicide for... some reason. Portrayals since have bounced back and forth between Anti-Hero, The Atoner or just a guy who likes to bash stuff. And then there is his intelligence, which varies between Dumb Muscle and a smart guy whose father was a nuclear scientist.
Perhaps even bigger case of derailment can be attributed to Cyttorak himself, the source of Juggernaut's power. He was initially the mysterious god of another dimension who didn't care much about good or evil on Earth. When Cain upon their first personal encounter tried to kill Cyttorak, he reacted with quaint amusement. These days Cyttorak is portrayed as a demon lord, who weakened Cain's power because he was displeased about him acting heroically. And now that Colossus is the Juggernaut, Cyttorak has said that he likes having a hero as his avatar, since what he really wants is for the Juggernaut to cause destruction, and whether it is due to good or evil intentions is irrelevant. Bwahuh?
Wolverine is generally a jerkface. It's part of his charm. But he's loved for the fact that, while a jerk, he's willing to realize when he's in the wrong and does care about his team and friends. Yet, in present comics, under the hand of Jason Aaron, this has been misrepresented as Holier Than Thou, with him acting like a complete unrepentant asshole to Cyclops because he disagrees with him, but it's seen as justified because he's right, despite massive flaws in his arguments. Specifically, he constantly argues about keeping the younger students away from the battlefield to preserve their innocence, which wouldn't be so bad had it not been for the fact that mutants were facing extinction and needed to be able to defend themselves and, when this is no longer the case, he argues about Cyclops taking new mutants out into the field, despite the fact that these ones are all much older than usual recruits. It's to the point that he's indirectly to blame for what happened in Avengers vs. X-Men by soiling Captain America's view on Cyclops prior to the two teams meeting. The worst part is that Cyclops barely bites back at first, with him generally giving counter-arguments to these claims that are tossed out or ignored. Eventually, Cyclops, quite rightly, points out Wolverine's hypocrisy, while Wolverine just shrugs these off with "that doesn't matter, you're still wrong", even at one point declaring that it doesn't matter that he's killed hundreds of people (including in one, infamous story also by Aaron where he kills an army of mercs who later turn out to be his illegitimate children from his many past relationships, and as noted in one fan-comic, Northstar-a character he's now on a team with), because "none of them mattered".
Proof that Jason Aaron should not write X-Men is the fact that he has all the X-Men under his wing call Cyclops (and his friends) out on anything he does and constantly pick fights with him, even if the situation calls for them to put aside their issues, most notably during Battle of the Atom and following issues. Even when they've got the future Brotherhood of Mutants on the loose and Cyclops is telling them they should focus on finding them, Storm feels the need to accuse him of being a supervillain, while both Kitty and O5!Scott pick arguments with Magik and Present!Scott respectfully, even though the Bendis issues establish that O5!Scott is coming around to understanding Present!Scott, as well as showing that Kitty and Illyanna are still really good friends. This wasn't just derailing canon characterization, this was derailing the characterization characters expressed mere issues ago, to the point it seems he just doesn't bother reading what the other guys are doing.
X-23's first two appearances in All-New X-Men receive a significant amount of flak for this. While Laura's Spock Speak has always been subject to Depending on the Writer to varying degrees, she has nonetheless been consistently portrayed as The Stoic and more formal than her peers. In All-New X-Men, readers found her personality and behavior excessively un-Laura-like in #20. In particular, they point to how talkative she is compared to her normal depiction as The Quiet One, and the significant amount of slang in her dialog. Word OfBendis states that her behavior in the series is because Murderworld and her subsequent torture by the Purifiers before she turned up in Miami were the events that finally pushed her beyond the point at which she can cope with all that's happened to her. While accepting that it's believable Laura has been pushed past her breaking point, fans tend not to agree with him on the sudden personality shift.
Rick Remender's handling of characters in Uncanny Avengers has been called into question:
After Wanda Maximoff returns, Rogue is the first and only X-Man to be somewhat sympathetic towards her. In UA, she hates her with a fiery passion. While this could be justified with Xavier's death, fans generally don't buy that explanation and just feel Remender really needs a Conflict Ball between members of the team.
A clear-cut example would be Cyclops telling Alex Summers that he "learned better" than to fight for Xavier's dream. All other series he's appeared in have him fighting for Xavier's dream, just in a slightly different way.