There is a certain story arc that is not uncommon in many stories and real-life events, where the protagonist or essentially a group of people set out with what seems to be a just and noble cause.
They usually end up somewhat achieving what they wanted, but they end up getting corrupted, and they lose sight of their initial selves and their initial cause. Immediately the Russian Revolution and Animal Farm come up. Their noble cause was to create a fairer world where all people were equal, but they ended up doing a lot more harm to themselves.
I can also think that Breaking Bad, while not exactly literature, has that story arc where, at first, he wanted to leave something for his family and was a good person. By the end, he becomes quite evil and admits that he is doing it for himself.
I am trying to find a word or phrase that describes such story arcs or personalities. If anyone can also recommend anything like this including literature, or shows, I would appreciate it.
Edit: There is one more element I think, where the protaganist/s still think they are doing the right thing even though they are in fact evil.