This is a special post for quick takes by Richard_Ngo. Only they can create top-level comments. Comments here also appear on the Quick Takes page and All Posts page.
Brandon Sanderson's books have some interesting variants of this as well.
Spoilers for the Mistborn series (to the best of my recollection and with some consulting of the fandom wiki) (putting in collapsible for now, because I can't get spoiler blocks to work with this new editor):
At the end of The Well of Ascension, Vin gets a hold of the power of Ruin (one of the Shards, roughly god-like entities of the universe). She knows that she can use it to eliminate lots of the world's atrocities etc. Sazed, informed by a misty ghost, tells her that "it's a trap" and she needs to release the power. Some other misty ghost appears out of nowhere and stabs Elend, nearly lethally, apparently to force Vin to accept the power, so that she can save her loved one. But she doesn't do that, releasing the power, which turns out to free its prior weilder who is the bad guy and now goes on to destroy the world. He was also the spirit that told Sazed to stop Vin. Whereas the ghost that stabbed Elend was the Vessel of another shard, Preservation, a good guy (relative to Ruin, at least).
At the end of the next book, The Hero of Ages, Sazed accepts the powers of Ruin and Preservation, ascending to godhood and becoming Harmony. He approximately fixes the world, but then in the following series, it turns out that he's not as powerful, as we might have predicted, and also the divine power that he has been wielding starts shaping his mind, so that he becomes more interested in things being Harmonious, than in "goodness".
ETA: it's plausibly relevant that Sazed, at the moment of Ascension, absorbed all the knowledge that had been stored for millennia in his Coppermind "amulets", so that he could learn from the mistakes of the past generations and not screw things up as much.
IDK what the morale is supposed to be here, if any. "Sometimes you need to power-grab because otherwise someone else will power-grab in your place, but also beware because power corrupts and divine power corrupts in an ungodly way, so attaining instrumentally convergent goals is of limited value if it meddles with your utility function in unendorsed ways, be it due to some contingent peculiarity of your mental structure, or some more general fact of how minds work."?
(There might also be something along those lines in other Sanderson cosmere books, but it's been long since I've read any and I'm not up to date.)
ETA: Another relatedly interesting plot twist in Mistborn is that it turns out that the original bad guy, the Last Emperor, who gets killed at the end of the first book, imposed an oppressive regime in order to prevent humanity from Ruin. He also changed the planet for altruistic reasons that turned out to be misguided and hence harmful.