As others have said, you need to make the bad decisions believable by the reader.
The easiest way to do that is to make the hero struggle with terrible consequences for doing the right thing.
An example of this is given in a preview (of some series I am not watching, and cannot recall the name) in which, in a 30 second clip, a law enforcement agent is given the choice between her kidnapped child being killed, or ratting out her team. Apparently the bad guys have her kid, she is convinced they will kill her, and she panics as their countdown progresses, then screams the names of her team into the phone. They all end up dead.
The price of righteousness can be too horrifically high for just about any of us, so high that even if we were willing to sacrifice ourselves, we can't bear to sacrifice somebody we love (as a parent, sibling, child or mate).
This is why most "good bad cops" we see on TV (Good guys that occasionally break the law, like conducting an illegal search, or Jack Bauer beating a confession out of somebody, or using tricks to keep a bad guy more than the allowed 24 hours) are still seen as good cops, not criminals. Writers are usually careful to show the audience that the bad guys are really bad, so the actions of the good bad cops feels justified to the audience: If they don't break the law, something awful could happen to harm innocent people, so the good bad cop seems like they are still acting in the best interest of the public. (Until they are completely wrong about the guilt of someone, and therefore harm somebody innocent by sending them to jail or getting them killed).
You follow up these "unavoidable" transgressions with further voluntary transgressions to cover up those transgressions. Back to the good bad cop: She doesn't want to go to prison or be disgraced -- So if somebody suspects something funny in a case she secretly torpedoed, she exploits her position or their trust to interfere with their investigation, so they can't find the truth.
Eventually these crimes escalate, or backfire, and the cost escalates to voluntarily doing something evil, like intentionally killing somebody to protect themselves and avoid punishment. This weighs on their soul to the point the only escape is numbness, the only rule is their own survival at any cost. That doesn't have to come with greed, but maybe it does.
They have been turned, their morals are ruined. But hopefully you have brought the audience along seeing that for every choice, the consequences of doing the right thing was terrible, and the "hero" wasn't strong enough to take it. The first such choice must have such horrific consequences it breaks him.
But after that one breaks him, you can progress down the scale from "doing right is an impossible choice" in steps, down to "doing wrong is the convenient choice". Once his morality is broken, it only gets more broken.