Given the general quality of 90% of all fanfiction, it should go without saying that this happens a lot in fan-made stories, but even the good ones do this to their characters sometimes.
In the Harry Potter fandom, the two most common victims of this are Dumbledore (typically flanderized from a well-meaning Obi Wan into a sadistic Manipulative Bastard) and Ginny/Hermione (whoever's on the wrong side of Die for Our Ship this week), but other characters aren't immune to this either. Tragically, Luna Lovegood seems to be a frequent target of authors who don't know (or don't care) how to keep her unique personality intact. Typically, these stories wind up revealing that Luna's Bunny-Ears Lawyer personality is a "mask" used to conceal a much more normal (read: boring) character underneath.
One of the best examples is of course My Immortal, where Dumbledore shouts "WHAT THE HELL ARE YOU DOING YOU MOTHERFUKERS!"
Don't forget Ron, who gets turned evil on a regular basis, or at the very least his character flaws (including a bit of an inferiority complex) Flanderized into his only defining characteristics, often for the sake of Die for Our Ship or because he's not special enough. He's not the Trope Namer for Ron the Death Eater for nothing!
Even the people who are liked by the author aren't safe, just in the opposite direction. Hermione/Ginny (whoever's on theright side of Die for Our Ship this week) will be turned into a weak-willedbut beautiful arm candy who's only defining quality is being with Harry. Harry meanwhile, often becomes vindictive and heartless to any friend who the author doesn't like, assuming he doesn't become an outright sociopath.
Digimon: In addition to the usual Mary Sue-related stuff (everyone loves Sue except for Suethor's least favorite character, who is now an ax murderer and gets hit by a semi... show me a fandom that doesn't have it) there are a few characters people like to pick on. Most prominently, Matt (Yamato) has never really been forgiven for winding up with Sora, so he's usually turned into an abuser and Sora falls into the arms of her One Twoo Wuv Tai(chi). History Repeats Itself with the 02 fandom, turning TK into a massive dick and Davis, who in the end became the essence of optimism and determination, gives up simply because "he lost Kari". Rika (Ruki) also winds up being nothing but a damsel in distress to be saved by [insert male character here.] It can actually be any of the male leads - the only consensus is that Rika's actual badass canon persona won't do, she must do nothing but cry and be 'rescued.'
Transformers: While there's a lot of Ho Yay there, make no mistake: Starscream really does want to kill Megatron. In fanfiction they have more of a Slap-Slap-Kiss relationship.
An interesting case happens in Light and Dark The Adventures of Dark Yagami with Naomi. She's first introduced wanting to catch Kira for killing Raye, which is an accurate basic reflection of her character. However, it's revealed that it was actually Takada in disguise, and the real Naomi mainly serves as Dark's girlfriend.
And speaking of Death Note, LxLight fangirls will often do this to Misa for obvious reasons. Yes, Misa is not that smart compared to L and Light (and really, WHO IS?) but she is still pretty clever when she wants to be. Fanfic writers tend to ignore this and just make her a complete idiot (occasionally having her use Valley Girl speak to make her look even stupider) before ultimately killing her off.
Gundam Wing fanfiction almost always does this to Relena, Heero's canonical love interest, since there's more or less no possible way for Heero to get with Slasher favorite Duo while her personality is intactnote especially given that, as she is, Duo ships Heero/Relena. In fanfic, she's usually a catty, jealous shrieking harpy willing to kill to make Heero hers by force and blood. In canon, well, apart from anything else, her Image Song is about how I Want My Beloved to Be Happy and she'd be willing to leave him if he fell in love with someone else.
Kingdom Hearts fanfiction has the habit of taking the members of Organization XIII, the resident ambiguously evil group, and turning them into misunderstood people who only want to have hearts and it's the series' protagonist and his allies who are the real evil. The fics usually also gloss over the pesky "no hearts" part, despite this and the subsequent lack of emotion being the Nobodies' trademark characteristic in the games. Granted, Dream Drop Distance revealed that they do actually naturally develop replacements for their hearts over time, but this still does not excuse the general out-of-characterness that runs rampant in the fanworks.
Perhaps one of the worst cases of character derailment ever seen is in the intenselypolarizingPokémon fan fiction Pokemon Revolution written by Farla. In it, characterization is completely discarded. In two of the worst cases, Gary goes from asshat, egotistic rival to misanthropic sociopath. And Ash goes from loving but dim Pokémon trainer to hateful trainer with a raging vendetta. All the while, the Pokémon themselves are derailed into Kill All Humans types who will gladly slaughter hundreds of thousands of civilians at the mildest coercion.
Latias Journey has several examples of this, most notably Richie, Giovanni (after dying), Deoxys, and the fake ending's version of Mewtwo. In most cases this is justified by The Corruption, in Deoxys's case it's justified by Rule of Drama (and the Deoxys movie not being out when the story was started), and the fake ending Mewtwo wasn't real to begin with.
The sequel's version of Dawn (yes, THAT Dawn) is so different from the anime's version that she might as well be a separate character. To clarify, she is essentially a mix between Zuko and Shinobu. This could be attributed to the fact that she is a Composite Character of Sadic from the aforementioned Latias' Journey and Dawn's Bunery in regards to her romance.
One of the best cases of this trope ever (showing that Tropes Are Not Bad) is Bella Swan in Luminosity, where the normally annoying, wangsty and suetiful little strumpet is turned into... a rational person. Seriously, this is the catalyst for a Twilight fanfic that the haters genuinely love.
Then, over in the Neon Genesis Evangelion fandom, there's Shinji And Warhammer 40 K, which derails Shinji from his canon, psychologically damaged self into Captain Awesome Badass McEpic von Powerfist, equal parts Kamina and Vance Motherfucking Stubbs. This has been a wildly popular move, to the point where the page for this fic gets almost as much love as the one for Evangelion itself.
In Fandemonium, since several different writers are writing for several other different people's characters, personalities are often contradicted (except Hiro and Flames!) Most of all is Nightwolf, whose creator states "Nightwolf is mostly avoided being written about, although when he occasionally appeared he was written badly. I think that only twice in the entire series (not counting my episode) he acted sort of normal."
His entire role in Fandemonium was pretty much "hangs around for a while and then gets a bridge dropped on him." He had no character, and was rarely even mentioned until his death, which is sudden and unrelated to the plot.
Despite being a wonderful author otherwise, Kana37 over at fanfiction.net tends to make Inuyasha a soulless bastard who will just stand by when Naraku or Kikyo attacks Kagome, especially if it involves protecting Kikyo in some way, shape, or form. This is usually the premise for her Sess/Kag fics.
In an unusual example of Tropes Are Not Bad, there's Harmonystuck, a Homestuck AU in which the kids, trolls, Felt, and Midnight Crew are raised by a good version of Doc Scratch and every single evil character is nice. It's one of the sweetest A Us in the fandom, and is generally considered an antidepressant to the canon.
Then there's Pattycakes. Fluttershy is written as being so obsessed with having a child of her own that she psychologically breaks Rainbow Dash until the blue pegasus reverts to an infantile mental state, and in one ending totally destroys Scootaloo's mind for failing to comprehend the philosophy she never bothered to explain (Element of Kindness? Mo' like Element of Mind Rape!). Zecora is mentioned in backstory as having helped develop the mental regression drug, which fits with her herbal skills but not her actually possessing a functional brain. There's also a lot of ponies who are just sort of arbitrarily "into" age play, to the point of taking doses of the aforementioned drug - even ultra-prim-and-proper Rarity (who, if you suggested that she enters a state where she would periodically shit herself, would likely give you the same kind of expression you'd earn from the Pope if you visited him with pamphlets about converting to Islam).
This is because there's no way canon!Celestia would ever condone the TBC ponies' actions, or at least not in most TBC-verses.
A particularly infamous example is from Ten Minutes: Aftermath, which purports to be a sequel to Ten Minutes, features both Michael and Celestia acting wildly out of character in contrast to the original. Whereas Michael was calm and determined in Ten Minutes, he is now ragingly angry, unsure of his own motivations, and pointlessly cruel. Celestia was shown in the original as aloof and arrogant; now she's a Messianic Archetype. The bomb used by the human resistance has now also been declared a planet-destroyer despite there not having been any indication of this before. The author just likes them better this way.
There are plenty of Rocky Horror Picture Show fanfics which derail Frank's character in favor of pairing him up with either a Mary Sue or with whichever character they ship Frank with. Frank is often written as giving up his lustful ways (which he would never do because of his hedonistsic nature) to settle down with his "one true love". Often, this is the result of him "seeing the error of his ways" after he somehow hurts his "love interest" (About the only character he felt any remorse towards losing in the play is Columbia, and even then he's a complete Jerkass about it). Or, him being reunited with a "long lost lover" from his past.
This can apply to other characters as well. Columbia is either a Clingy Jealous Girl or a ditzy Damsel in Distress in the fanfics unlike the Harley Quinn-esque character she is in the play/movie.
Riff Raff is more often in not in fanfics portrayed as nothing more than a constant source of Foe Yay between him and Frank resulting in the duo becoming lovers. While it is true that Riff Raff did have some resentment towards Frank's treatment of him (hinting that he wanted Frank to like him), Riff's general attitude towards Frank is that of resentment and jealousy. Not to mention that Riff's canocial lover is his sister, Magenta.
Speaking of Magenta, most Frank/Riff Raff fanfics either portray her as a manipulative and abusivise sibling towars Riff Raff or she simply doesn't exist. In the play/movie, she shares a very close bond with her brother and even helps him rebel against Frank.
Since the author is a Harmoniannote a Harry/Hermione shipper for those not in the know the whole Weasley family (save Arthur) gets treated horribly: Ron is a volatile idiot and Ginny is a whore; both of them are coached by Molly into slipping love potions to Harry and Hermione in order to separate them. Fred and George are greedy opportunists who don't care who gets hurt in their pranks, and it's as if Percy never got his Character Development from the end of the last book.
That is not to say that all Harry/Hermione fans endorse this fanfic, because they do not. In fact, while a person may enjoy other works by this author, many people find this particular story to be painful to read, especially if they prefer to read Ron in a friendlier light... who just happens to find a girl for himself.
McGonagall doesn't care in the least that two students constantly have sex with each other.
Dumbledore outright encourages Harry and Hermione to keep up their deception of Ron.
Most surprising of all, Umbridge is actually a genuinely nice person. It turns out that her Bitch in Sheep's Clothing persona is just an act, and she idolized the Marauders when she was in school. (She is also younger than Harry's parents for some reason.) This of course serves to eliminate all conflict from the fic's retelling of the fifth book.
Pretty much the only characters who escape relatively intact are the exceedingly minor ones, and the more important ones lucky enough to fall Out of Focus.
Frozen fanfic authors constantly see fit to derail the strong, valiant determinator Princess Anna, who managed to keep a strong sense of optimism even after years of isolation, into some sort of kicked puppy who is constantly suffering emotional breakdowns and is in desperate need of Elsa's affection. What Anna went through in the film can certainly be considered traumatic, but fanfic!Anna apparently can't go a second without something reminding her of her horrible childhood and leave her sobbing her heart out. Not only does this represent strong Chickification, but it also derails her selfless, others-first nature from the film and replaces it with a selfish Attention Whore who constantly wants her sister to make things better, often actively disrupting her royal duties to do so. Usually this is done to make Elsa, who was very emotionally sensitive in the film, appear stronger, and thus put her in a dominant position when the romantic attraction breaks out between the two.
One especially bad NsfwNaruto story derailed Naruto's personality in the story. When he discovers that one of his fiances is pregnant, Naruto is overjoyed at the idea of being a father and having a family. A few chapters later he offhandedly mentions that while traveling the elemental nations, he never practiced safe sex and has (by his count) a few dozen children throughout the continent. He also tells another fiance that he doesn't really care if she sleeps around because he fully intends to do so himself.
In the Sailor Moon fanfiction I'm Here To Help, the senshi of present times, particularly Sailor Moon, are portrayed as laughably incompetent, allowing Emerald to step in and help them in battle. (Granted this was early on in the series, but they still knew things like to press their advantage when the enemy was distracted.) Mars's contribution to the plot is generally being sad that Mamoru left her for Usagi and obsessing over Emerald, to the point where Jupiter decides that with the Silver Crystal reappearing, Sailor Moon being revealed as Princess Serenity, and Mamoru being violently kidnapped, the best thing to do is ask Emerald to comfort Mars over being dumped. Among the future senshi, Venus is shown as an embarrassingly nutty host to a children's show she created and Jupiter and Mars dismiss their implied attacking/killing of several children as justified because the children were helping Emerald. All of the senshi are described as being violent warriors, while Neo-Queen Serenity (who in canon was a kind ruler with some of her past self's goofiness still intact) brainwashes and emotionally castrates everyone on Earth for no given reason, and generally leaves the planet to rot in poverty aside from Crystal Tokyo. Pluto is hit pretty badly as well. In canon, she takes her duties as guardian of time very seriously, even attacking Sailor Moon for trying to cross into the future. In the fic, she not only turns a blind eye to Emerald going to the past, but arranges events so that he succeeds in rewriting the timeline, essentially erasing her entire present, all her friends, and her queen from existence, just because she didn't like Crystal Tokyo.