Nancy Drew began as a strong, capable young woman who was quite snarky and would talk back to authority among other things. She slowly became more of a meek, watered down Mary Sue, never exhibiting any "mean" traits, always doing as told and many times becoming the damsel in distress. Strange that she was a much more of a strong, confident woman who could hold her own in the 1920s than now.
In a 1940 essay on Charles Dickens, George Orwell noted that Dickens derailed his characters all the time, and is "never better than when he is building up some character who will later on be forced to act inconsistently."
Roran from the Inheritance Cycle undergoes a very sudden case of this after his slaughter of nearly 200 Mooks, wishing he could have killed more. This is nothing like how he has been previously characterized (he even angsted over the men he'd killed).
In a clear case of Writer on Board, in The Land Of Mist Sir Arthur Conan Doyle has his ultra-rationalist hero Professor Challenger (who has always denied the existence of the supernatural) convert to Spiritualism. The novel is an Author Tract written following Doyle's own conversion to Spiritualism and is easily the least well-regarded (but longest) of the Challenger novels. This is a controversial example, however: For it to be true derailment, it has to be implausible, and Doyle does provide a catalyst for Professor Challenger's volte face in the death of his beloved wife.
Straddling the line between Film and Literature is the only canonical sequel to the film E.T. the Extra-Terrestrial: The Book of the Green Planet. Any ET fan who reads it will immediately wonder why the heck ET now wants to immediately return to Earth once he's aboard the ship (the novel begins right after the film's end credits), for what reason, exactly, does ET want to get back to Elliott so bad, and why in the world is ET behaving like a jealous ex every time he gets in telepathic contact with Elliott — who, in two character derailments for the price of one, suddenly has a crush on a girl classmate.
Jacob Black is introduced in the first Twilight book as a boy with a crush on Bella, fleshed out as a nice, likable guy in New Moon who becomes Bella's best friend and just wants her to be happy, and then derailed in Eclipse into a love-crazed person who sexually assaults Bella and breaks her hand. It's almost as if Meyer feared that she had made Jacob too sympathetic a Romantic False Lead and did some canon Die for Our Ship in the succeeding book to sink the Bella/Jacob ship. Jacob's characterization in Breaking Dawn is better... until he's trapped in a squickyCleaning Up Romantic Loose Endsscheme.
Then there was Charlie, Bella's father and who a lot of people call the only truly likable character in the series. At first, he was an overprotective father (which seems justified considering who his daughter hangs out with and his daughter being, uh, well a little too love-obsessed). Hell, he was a police officer. Then when the aforementioned event of Jacob assaulting her and breaking her hand happens, he brings her home basically to brag about it.... Which Charlie congratulates him for doing.
In Eclipse, the brief amount of time we see Bree Tanner leaves her very pitiable, between her being shanghaied into a newborn vampire army and sent as cannon fodder against the Cullens and being murdered by the Volturi. In The Short Second Life of Bree Tanner, she goes on endlessly about how humanity sucks and she's so glad she left her human life to be a vampire, showing absolutely no acknowledgement or compassion towards the fact that she now survives by murdering people. Because, you know, any vampire who is not with the Cullens can't possibly have their condition portrayed sympathetically.
In Twilight, Laurent is stated to only be traveling with James and Victoria for his own protection. Once the Cullens separate him from James, he shows no hostility toward anyone in particular and when we last hear of him, he's gone to live with the similarly non-murderous vampire coven in Denali, Alaska and shows interest in the "vegetarian" lifestyle that they live. When he returns in New Moon, Laurent is in full Card-Carrying Villain mode and tries to eat Bella just because he could and saying things about how Bella should be grateful that it's him eating her instead of Victoria.
Count Hasimir Fenring in the ''Dune'' prequel trilogy books. He goes from the only friend the emperor has and actually a fairly decent (though very dangerous and plotting) guy to a huge jerkass with no loyalties or real redeeming characteristics. He is also rather incompetent, and apparently in the later sequel books tried killing Paul Atreides for no real reason when you consider he could have done so in the original book easily enough himself. Also the Emperor turning from a slightly vicious but competent Emperor to a rather stupid tyrant in the same prequel books.
Warrior Cats: Double subverted in Twilight when some of the characters are confused about how Onestar became such an ass overnight. It's at first dismissed as him asserting WindClan's independence, but it's still ongoing seven books later. In fact he's even worse now.
Some fans may argue that there was no character there to derail, but most of the heroic female characters in The Wheel of Time went through this pretty heavily as the books went on. Robert Jordan wanted to portray them as strong in spirit, with Nynaeve in particular suffering from some anger issues. Later on, they all became judgmental bitches who thought all men were "woolheads" and never stopped trash-talking all men in general, particularly the men who would do things like attempt to rescue them when they're captured. And Nynaeve's anger issues spike dramatically as the series goes on. She seems to fly into a rage over the smallest things.
Note, however, that much of this came while they were surrounded almost totally by women (Egwene especially). Considering that a major theme of his series was to explore a universe with an altered gender dynamic, some of their examples clearly represent the casual sexism of locker room environments.
A Song of Ice and Fire Cersei was the primary villain in the first book, and was a noted schemer. Her plot to kill Robert Baratheon was very clever in how it came off as an accident. As the books go on, she's presented as more and more incompetent. Justified, in later books Cercei's scheming is portrayed in more than just her own viewpoint. She views herself as a brilliant manipulator, it turns out all the real players think she's a complete idiot, including her own family. At least Book 3 has her successfully twisting peoples' arms to testify against Tyrion at his trial. However, when Book 4 comes and presents her perspective, she's shown as a complete moron time and time again. Not only is she seeming to be more pathetic as a plotter, she actually comes off as *less* sympathetic when you see her point of view. In the past she was at least considered a devoted mother, but in Book 4 she seems awfully indifferent about her children except for how it impacts her. In fact, it's presented that since there was a prophecy that said all of her children would die before her, her concern for her children's well-being could have a much more selfish bent. In-Universe, other characters seem to note how awful she's become. Littlefinger predicted that she would ruin the realm, but not nearly as fast as she did. Her brother Jaime begins to wonder why he ever felt attracted to her once he realizes how pathetic and evil she is.
Of course, a continuing theme in the stories is the difference between taking and holding power. Cersei was good at increasing her power, but the presence of her father Lord Tywin enabled efficiency in the Lannister regime. After his murder, Cersei holds complete power and refuses to let any-one reign her in.
Remember when Anita Blake Vampire Hunter was a tough, sarcastic but interesting young woman who hunted vampires and played in the sandbox with various preternatural critters like werewolves, wereleopards and the like? Up until The Killing Dance, she was also a Celibate Hero. Then she slept with a vampire. And then she slept with a werewolf. No big deal, she just had to choose between the two of them and—oh no, there's this thing called "the ardeur" that means she has to have sex every few hours or she will in fact die. And then she began an insufferable, short-tempered God-Mode Sue who wants everything to go her way all the time or she'll kill you.
Karen Traviss loves to tell readers how Jedi are incompetent and evil and Mandalorians are awesome. Since the Star Wars EU is a shared setting and characters established by other authors are fair game (though it's apparently considered bad form to handle them without permission), Traviss cameoed Scout as someone who the Jedi disliked and rejected because her powers were weak, heavily implying that she became a Mandalorian. One problem: Scout's powers were weak, but she was inventive and ridiculously determined to overcome that, which the Jedi and especially Yoda respected. Traviss has said herself that she doesn't read anything from the EU; she gets people to provide characters to use and basically ignores anything she doesn't like.
And in Traviss' notes for the now canceled Imperial Commando 2, she stated that Scout would have remained a Jedi with Jedi Master Djinn Altis' sect of Jedi in-hiding. The only thing that would have changed is Scout being adopted by the aformentioned Mij Gilamar as his daughter, and not a problem in Altis' family-friendly Jedi sect.
Thus turning Scout to the biggest moron in the entire galaxy since her back story as a weak-in-the-force-but-detemind-Padawan who struggled so much to prove she could be a Jedi complete pointless since she could just joined that group of Jedi!
Two glaring examples from Legacy of the Force were Jacen Solo and Tahiri Veila. Jacen went from being an intelligent and highly moral Jedi to a raving mad Sith Lord seemingly for no other reason than because he learned from a very questionable source that one of his teachers had once been Sith herself (said teacher's philosophy was rather darker than that espoused by most Jedi, true, but Jacen himself had never shown any real sign of buying in to her more brutal teachings himself, and even these were often diametrically opposed to orthodox Sith philosophy anyway). This was intended to be an example of Jumping Off the Slippery Slope, but it's so abrupt and the resulting character so different from the Jacen EU fans were familiar with that it was very jarring.
Tahiri Veila, Jacen's apprentice, had it if anything worse. At the end of the New Jedi Order Tahiri was a damaged but strong young woman who had clearly passed through her trials a stronger person. In LOTF she's suddenly regressed to how she was immediately following the death of her love, Anakin Solo, and is willing to do anything for Jacen (up to and including murder) if he'll use the Force to show her visions of Anakin from the past. Also, the fact that Tahiri was effectively half-Yuuzhan Vong thanks to a Shaper's experiment was greatly played up in New Jedi Order, but ignored almost completely in Legacy of the Force.
The really annoying thing? Both of the above characters were canonically established as having darkness in them- it would have been entirely possible to turn one or both evil much more tragically without simply flipping a switch in their personalities, but said flipping is what ultimately happened.
The Arrows trilogy of the Heralds of Valdemar series depicts Skif as a Lovable Rogue and good-hearted troublemaker who uses his quick wit, street smarts, and willingness to bend the rules to help Talia quite a bit. When he reappears in the Mage Winds trilogy, the character is barely recognizable and exists mostly to act as a wet blanket and Hopeless Suitor towards Elspeth on her journey. Winds of Change eventually explains that he's suffering from PTSD and examines his emotional state more closely, but since the event which caused his trauma happened off-screen between trilogies and hadn't been mentioned before, it seems a bit tacked-on.
In The Chronicles of Narnia, Susan is initially portrayed as the most mature and reasonable Pevensie sibling. By The Last Battle, in a highly controversial (and in some people's eyes, sexist) development, she appears to have become mainly focused on going to parties and gossiping, and no longer believes in Narnia. She'd already shown signs of it in Prince Caspian (although seeing Aslan again shocked her out of it) and it was mentioned in The Voyage of the Dawn Treader on account of being the 'pretty one of the family' she got to go on a long trip to America with her parents (which might have contributed to it). This of course brings up Unfortunate Implications concerning Lewis' views on the US...
Provost's Dog: Somewhere between books two and three, Tunstall of the Provost's Guards went from being a friendly, widely-liked, upstanding man of the law who was friends with almost everyone and was happy with his lot in life to a grumpy, misanthropic man who was barely civil with his own partner and betrays and tries to kill her (right after he tells her she's like a daughter to him) and the young prince so he would be elevated in station.
It really does come across as Tamora Pierce needing a villain, and deciding that it can't be Farmer because then Beka won't have a love interest and that it can't be Sabine because making a woman do crazy things for love is sexist.
More than that, Tunstall's specifically seen in Terrier as being fine with mages—Beka herself is a mage, and he seems to enjoy good-naturedly teasing Berryman, a powerful gem mage. Come Book Three, he apparently can't stand them and freaks out every time Farmer does a spell. Yes, this is the same guy whose only reaction to watching Beka talk to dead people is to feed the pigeon she's chatting to.
Beka suffers from this as well, and, by proxy, her friends. When the book opens, she's at her betrothed's funeral. Said betrothed was verbally and possibly emotionally abusive—although it's very hard to get away from an abuser* abusers are very good at Mind Screwing their victims into staying, it's implied that her extremely protective friends did nothing about it, and that her extremely protective god-like constellation cat neither said nor did anything about it either despite the fact that he'd made his dislike of Dale, her previous love interest, very clear — and Dale was nice. Later, while on the Hunt, their group of four realizes that one of them is a traitor. Beka suspects Farmer, a man she barely knows, less than her partner of seven years and a close, loyal friend of four years, because she "just can't see" him being a traitor. Please note that Beka is notoriously shy, doesn't warm up to people quickly, and is very slow to trust people. Then she falls completely in love with Farmer within the last 1/3 of the book and declares that she will happily marry him. There's more than one reason this book hasn't sat well with many fans.
Discworld's Snuff exhibits several of radical changes to several major characters.
Vetinari's debut has him raving like a madman because the crossword lady nearly outwitted him. He's moved by a Goblin's music where previously he was specified to prefer reading sheet music to listening to it performed and he goes out of his way to have Gravid Rust murdered because he had enslaved a community of Goblins.
Willikins goes from a prim and proper and well spoken butler with a slightly shady past to street scum who can barely string together a coherent sentence and just happens to be a butler.
Sam Vimes, previously a simple (or so he would like you to believe) man who is thrown out of his depth and succeeds through sheer grit and determination (and not a small amount of luck) is very quick to start throwing around his station and the fact that he knows all sorts of big important people, where previously he would only do so if he were pushed to it, who wins because he's Sam Goddamn Vimes who has the power of an Eldritch Abomination at his back.
The follow up Raising Steam continues this with Vetinari, who becomes downright sadistic in forcing Moist to push a train line through to Uberwald, mostly so that Vetinari can make quicker and more comfortable journeys to visit his vampire girlfriend. And charming non-violent conman Moist himself spends most of the novel blandly negotiating right-of-way contracts for said line, before drinking a potion and killing a bunch of heavily-armed dwarvish terrorists single-handed.
These rather blatant cases can sadly be explained by Sir Terry's very real battle with Alzheimer's disease.
Happened from book to book in Sweet Valley High and its spin-offs, particularly the tendency to make Elizabeth increasingly self-righteous and Jessica increasingly devious and backstabbing. Other examples include:
Bruce Patman, initially just an arrogant rich boy but later becomes an abusive jerk who tries to date-rape Elizabeth. In Sweet Valley Confidential he's a much nicer guy and he and Elizabeth fall in love, but happens again in The Sweet Life mini-series where, after Elizabeth stands by him through an allegation of sexually assaulting an intern, he publicly dumps her for his lawyer Annie Whitman.
Isabella Ricci in the Sweet Valley University books goes from a friendly, popular, sophisticated girl to a neurotic wreck who almost dies after abusing drugs and ends up being sent to a psychiatric hospital, with very little on the page to explain why this happens to her.
The Baby-Sitters Club series briefly introduced Dawn's friends in California; including Jill, a girl described as thoughtful, mature, and kind. In the spin-off California Diaries, Jill is rapidly derailed into a childish, whiny brat whose friendship with the other girls ends when she deliberately sets them up to get in trouble over pranking a teacher. This was done so Jill could be removed from the group and replaced with the new characters of Amalia and Ducky.
Twilight Sparkle and the Crystal Heart Spell derails Trixie in great length. Word of God claims the book is canon to the My Little Pony: Friendship Is Magic continuity after the season 3 final. However her portayal is rather jarring. In season 1, Trixie was a pretentious magician boasting that she's the greatest magician in all Equestria. At the end she has to fly Ponyville when her exploits are revealed to be made up. It's notheworthy to mention she was also a controversial exemple of Designated Villain and Unintentionally Sympathetic since many viewers feel like she did nothing wrong before Rainbow Dash started booing to her performance. She comes back in season 3 as an antagonist, we learned that after the event in season one, she became a laughingstock and was unable to go anywhere with her magic show without being laughed out of town. She goes back to Ponyville with a powerful artifact to seek revenge on Twilight. At the very end Trixie realizes her faults and makes peace with Twilight Sparkle. Comes this book, Trixie is against resentful toward Twilight, is described as a bully and teams up with Gilda to replace Applejack's cider with gloopy green gunk for the sake of it.
Her superior Admiral Parangosky was originally described as crueler than Halsey, and authorized a darker version of Halsey's SPARTAN Program that ran on We Have Reserves. Glasslands makes her into the "good" counterpart to Halsey, though this falls flat because Parangosky also assembles a crew to start a civil war with the Sangheili, the species that rescued humans and are currently at peace with them.
Some of the characters on the film adaptation of Inkheart are given this treatment.
Dustfinger originally was friends with Mo and developed a close bond with Meggie. When he betrays them to Capricorn, he makes it clear that he felt awful for hid betrayal. It's also established that he is a good person, but he makes poor choices in his quest to return home. In the movie, however, he's a lot more selfish and refuses to admit that he did anything wrong. The writers definitely made him a Jerkass Woobie with his treatment towards other characters, namely Meggie and her family.
In Inkdeath, Farid falls victim to this. After spending two books fawning over Meggie, he finally gets together with her. So what does he do? Flirt with other girls and try to bring Dustfinger back to life. While the latter is an understandable motive, there's no reason for him to ignore Meggie for other girls, especially since he never did that before. This leads to Meggie leaving him for another guy, one that Fenoglio created.
In Ascend, the third and final book in Amanda Hocking's Trylle trilogy, the Trylle Princess Wendy turns down the tracker Finn (her love interest that she's kept from being with due to social barriers) the night before her wedding to Tove, after he begs/offers her one night together. Wendy ultimately refuses this, saying that it would be a horrible and unfair thing to do to Tove (since he is close friends with both of them), and that she promised to be faithful to him, despite the fact that they didn't love each other, and that one night with Finn wouldn't be enough to her. Later in the same book, after her now-husband Tove has an episode brought on by his psychic powers, Wendy gives her new flame Loki the same offer that she yelled at and berated Finn for making earlier, and they end up sleeping together, with absolutely zero negative consequences afterwards.
Also, Wendy's older host brother Matt. Shown in the beginning of the series to be quick to anger and to be rather overprotective of Wendy, when she announces that she's going to marry Tove, a man she's known for a few months tops, he barely protests.
''Hannibal has Hannibal Lecter try and fail to brainwash Clarice Starling. Then she inexplicably joins him anyway and becomes his lover, because...it's not actually clear why.
Between literature and theater we have Harry Potter's eighth installment, Harry Potter and the Cursed Child, where a Bad Future results because Cedric Diggory, of all people, loses the Triwizard Tournament and is so embarrassed that he becomes a Death Eater. Cedric, the guy who offered to rematch in a Quidditch match that he won fair and square, who helped Harry figure out the Second Task, and overall the franchise's biggest Nice Guy. One of many reasons that it's a Contested Sequel.