In a Pathfinder 1e game I ran, (using house ruled alignment and paladin class rules), a morally lawful good fantasy viking reluctant paladin of a morally lawful evil god of slavery, evil magic, and undeath died. The paladin had defeated an evil cultist, compelled him to give up his evil god, and kept him as a thrall to work on atoning for his evil past ways. When the paladin died in the magical fey touched land of the White Witch and Baba Yaga, the cultist convinced the party that the paladin was very likely to come back as a bad undead but that, with their permission and help, he could try to bring back the paladin as a free-willed undead to continue on the party's quest instead of as a monster that would come after them.
The party, after doing a speak with dead on the paladin, agreed to the plan. The druid used their Cauldron of Summoning to bring in animal sacrifices for the ritual they were attempting. The inquisitor of a good paladin goddess attempted to set up a ritual to mitigate the malign forces at work. The cultist took his old scroll of create undead from the party's treasure hoard and cast the spell.
The scroll worked, the sacrifice's blood flowed, and I called for either a spellcraft or knowledge religion check for the Inquisitor as she set up the impromptu church ritual to try to infuse the paladin with righteousness as he came back. She had some skill but not much and when the die roll came up a 1 . . .
The paladin came back as an undead antipaladin Knight of the Blackest Midnight, convinced of the righteousness of LE and diabolic principles.
The player accepted and embraced this character turn.
This went on for some time with the antipaladin being committed to the quest but also awful in many ways. The party quickly came to the conclusion that the powerhouse paladin abomination had to go. So when the antipaladin smite dueled a bad guy alone in honorable combat they left him to that then turned on him.
Alone he was almost a TPK for the rest of the party, but grease spells to prevent him from charging and most everybody else one shot away from death the inquisitor power attacking hit for 19 damage, enough to get him to zero exactly and finally brought him down. They burned his body in his huge tent along with his pack mule.