In The Secret River, Thornhill isn't exactly heroic to start with. But he goes from ambiguous to a villain.
An even more "they shoulda seen it coming" example: Raistlin Majere in the original Dragonlance books.
Subverted in Red Seas Under Red Skies, where the first chapter has Jean betraying Locke to a pair of assassins, then it flashes back to the start of the story. When it arrives back at the betrayal scene, we find that Jean was tricking the assassins and Locke just missed the hand signal for "lying."
A certain Imperial general in one of the later Warhammer 40,000: Gaunt's Ghosts is eventually corrupted by Chaos. Surprisingly, he's shown to actually be a decent man when hit by amnesia - even his jailer notes that the general becomes ever more an unlikable bastard as he regains his memory.
Dybbuk from Children of the Lamp, though it was sort-of foreshadowed in that his father just happened to be Iblis, the most evil djinn of the most evil djinn tribe, meaning he was half Always Chaotic Evil. It wouldn't be surprising if he eventually had a change of heart, though.
Brutus in the Emperor series. And indeed any other series ever written about Ancient Rome. Because, well, he's one of the best examples of it in real life.
Debatable, as Julius Caesar isn't exactly Snow White Pure. Brutus really defects in an attempt to prevent this very thing from happening to Caesar, who is becoming dangerously king-like. Justified, even, because the latter does eventually conduct a hostile takeover and declares himself Emperor.
Aramis, in the D'Artagnan Romances by Alexandre Dumas. In The Three Musketeers he's unequivocally One Of The Good Guys, alongside Athos, Porthos and D'Artagnan — although even then, when short of money, we see him accepting expensive gifts from his mistress(es). In Twenty Years After, all motives are less certain, Athos and Aramis find themselves (for different reasons) on the opposite side to Porthos and D'Artagnan, it is far less clear which side is In The Right, and it takes much more intricate politics to have them all on the same side again with their disparate interests in agreement: and, in the end, Aramis becomes the true, shadowy villain of The Vicomte De Bragelonne, as the person who wants King Louis replaced by his secret twin brother Philippe, not in pursuit of justice but in pursuit of his personal ambition to be Pope (and those of the Jesuits, to establish further control over Europe's rulers): and, knowing that he could not suborn Athos or D'Artagnan to this scheme, he tricks Porthos into assisting it instead. And yes, here, Aramis is a true villain even when presented in a good light, and the Musketeers' accord is blown apart: because for all King Louis's inadequacies, he is the rightful king, and in the book D'Artagnan recognises this and sides with Louis, conducting the ill-fated Philippe back to jail (though he later refuses to actually open fire on the fort containing his friends, D'Artagnan holds to their compact to stand together even though Aramis has broken it: as a result of which Aramis escapes at the cost of Porthos's life.) It is Louis who remains on the throne and leads France to greatness. It's also amazing how many films of "The Man in the Iron Mask" reverse the ENTIRE point, and have Louis be unequivocally bad, and the Musketeers all on the same side and succeeding in pulling off the replacement... Though that may have been Dumas's point.
The main Love Interest from Ursula Vernon's Black Dogs turns out to have been modified by the Big Bad before the novel even started to appear much nicer and gentler and less evil than he would be normally. Towards the end of the novel, the Big Bad reverses these restraints and the Love Interest becomes a major villain.
Peter Pettigrew, who everyone thought was James and Lily Potters' friend — until he betrayed them to Lord Voldemort and caused their deaths, which everyone initially blamed on Sirius. And Snape's involvement with that whole issue; he had one when he and Lily were in school, where they had a row and parted ways, leading him to the Death Eaters/Dark Side, although he really always loved Lily.
And arguably Voldemort himself; he started off as an (admittedly creepy) child in an orphanage and then got so screwed up throughout the years that he eventually became He-Who-Must-Not-Be-Named.
Also, it's hard to imagine that Percy was unaware Umbridge was ordering muggleborns' souls to be removed. A sufficiently dictatorial system CAN compartmentalise to this degree, through threat of violence and/or careful selection of personnel, and the Ministry under Voldemort qualifies. When he turns up for the final battle, Percy says his decision to turn face has been building for some time, so maybe he's been hearing hints and putting two and two together.
In The Demonata series, Nadia Moore was one of the disciples who later joined Lord Loss, masquerading as Juni Swan.
In The Fires of Affliction, Prince Jarden and Alorica Durnham, the prince and princess of two rival kingdoms, are both kidnapped by a Mystery Cult. When they try to make a break for it, Jarden holds the cultists off so that Alorica can escape and warn the royal families. In gratitude, Alorica joins a later mission to rescue Jarden — only to find that the cult has already brainwashed him in the meantime, and that he's now one of them, body and soul.
Nimue in The Warlord Chronicles is an interesting example — her motives and methods don't change, but all of the other heroic characters learn to compromise, and she never does.
In The Hunchback of Notre Dame, Archdeacon Claude Frollo is a compassionate man in the beginning, but after seeing Esmerelda, he goes mad with lust and slowly becomes evil, desiring to either have her for his own or kill her if she won't become his.
Gregory Kawakita at the very end of Relic, whose actions in turn lead Dr. Frock to undergo one in its sequel Reliquary.
This is what Katniss believes has happened when Joanna "attacks" her in the second book of The Hunger Games. She then comes to the conclusion that their other ally Finnick must be in on it as well. Katniss was wrong and both Joanna and Finnick were actually trying to keep her and Peeta alive.
In Seanan McGuire's Velveteen Vs the Junior Super Patriots, playing with this is central to the series. In the Back Story, the carefully hushed up secret beginning of the Super Patriots had one.. The Claw appears to be playing it straight, as do the Marionettes from alternate universe. Whether the appearance is the reality, and the extent to which the reality is driven by their treatment is brought up again and again.
In the Goosebumps book Calling All Creeps, the whole story ends on this note. After seeing how futile opposing the Creeps is, and wanting revenge against his bullying classmates, the boy who was trying to stop the Creeps decides in the end to become a Creep himself, because he would be their leader.
The Apprentice Rogue: Falita betrays the Order of Black Knights and her kingdom by stealing Leaoa's necklace and running away. The sequel sample confirms that she's become a criminal.
Ward Littell in James Ellroy's American Tabloid. Over the course of the novel, he goes from crusading FBI agent willing to put it all on the line to destroy The Mafia to working as house counsel to the biggest mob bosses in the country. As the book draws to a close, he conceives and orchestrates the JFK assassination and murders his best friend Kemper Boyd to stop him from preventing it.
In the Rivers of London books PC Lesley May is the beautiful best friend (and slightly more competent police officer) to the hero Peter. In book four, Broken Homes, she tasers Peter in the back to allow the Big Bad to escape. The reason is that at the conclusion of book one she had her face irreparably torn off by dark magic and the Big Bad has found a way to heal her, but only if she switches teams.
The House of Night: Neferet, in her backstory (as revealed in Betrayed) and Dallas.Also, Erin as of Hidden.