Well, in part it'll depend upon your rule set.
Do your rules (innately or through house rules) have free willed undead with an alignment other than "always evil"? If so, he might be okay. If not, then however noble the purpose the result isn't so snazzy.
Mine do, largely due to RW stories of good ghosts, faiths like Voudoun that recognize both sides of the issue, and those traditions that, like the Egyptians, believed that they could create immortal guardians of the dead from the spirits of the living (willing or not).
Which, I think, makes for a great plot. The person may not have known, or may have thought they could hold the evil at bay. But forever is a long, long time to slide down that slope. And immortality without the bonds of life may bring a perspective other than human. Certain acts, taken through the long view, may not look so bad (rationalization being easy when you have forever to make the ends justify the means), when really, they're still just evil.
There's that Road to Hell again!
But yeah- it is a good plotline. I've explored themes like this in my games (and my fiction)...and sometimes I've flipped it on its head.
One of my more memorable BBEG wasn't E. He was a powerful lich-lord, supposedly conforming in every way to the stereotypical Undead Lord of Evil, complete with undead armies, summoned demons and the like. At the campaign's start, his army stood on the brink of conquering the last bastions of goodness & light in the world.
Only the big reveal was that, over the countless centuries, he had lost interest in the details of his realm's conquests. Thus, he began to delegate more and more of the decisions to his trusted underlings while he spent more time researching magics of increasing power.
Ultimately, he was interested only in the new magics, and let all other things slide...including the conquest of the world and the magics that sustained his unlife. As those magics eroded without renewal, he became senile and somewhat childlike. In alignment terms, he was TN, and his former Viceroy had simply followed his last set of orders, becoming the defacto ruler of the land and the true driving force behind the Dark Empire.