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 an Author Avatar mirroring their writer's religious conversion is nothing if not realistic. (On the other hand, Challenger couldn't really be described as an Author Avatar in the previous two novels, so that probably qualifies for this trope.) Furthermore, the apparent catalyst for Professor Challenger's volte face regarding the supernatural was the death of his beloved wife, so if nothing else his abrupt change of views has a plausible explanation.
Straddling the line between Film and Literature is the only canonical sequel to the film ET 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.
Let's put it like this. The publishing company fired her from her own book series (they actually commissioned her to write it way back before it was televised, and consequently own the rights).
She apparently got fired because the show went a different direction with relationships than the books (which came first remember) did, and she refused to do the same in the books. I don't blame her.
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.
Actually explained in Cats of the Clans, where it's stated that Onestar knew that, as leader, he couldn't be known as "Firestar's kittypet, the one who'll roll over so that Firestar can tickle his tummy." He's not happy about, but he knew that if he was going to be accepted as leaders (especially under the circumstances), he was going to have to prove he wouldn't bow to Firestar's every whim.
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.
Admittedly, the new whore!Anita version was unveiled in "Narcissus in Chains" fully, a few books after "The Killing Dance," complete with that newfangled aurdeur. The fact that the author had divorced her husband and "upgraded" to the younger president of her fanclub? COMPLETE coincidence, of course. One has to wonder if it means the author went through her own derailment, or was merely hiding it well.
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.
Skif from the Heralds of Valdemar series goes from a streetwise, snarky, and incredibly skilled former thief to love-starved twit in the Winds trilogy.
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...
The 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.
Arguably, the second point just further emphasizes how awe-inspiring the music was, and is a case of OOC Is Serious Business.
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.
Notably only around Vimes; the rest of the time, he's the same as always, indicating he just became more laid-back around Vimes once they got to know each other more.
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.
With Vimes, it could also be that being the host of he aforementioned Eldritch Abomination changed him far more than he realizes, or would be comfortable with if he did realize it.
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
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.
In the first three Halo books, written by Eric Nylund, Dr. Catherine Halsey was a ruthless but guilt-stricken scientist who ordered the kidnapping of children to be turned into super-soldiers in order to prevent imminent civil war. She ends up regretting this decision heavily, turning from her "ends justify the means" philosophy in the second book. Come Halo: Glasslands, written by Karen Traviss, and Halsey has turned colder, her motive has changed to For Science!, and she's compared in-story to Joseph Mengele.
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.