I don't think such a word exists in English. The closest I could think of is vigilante (wiki) (wiktionary).
From Cambridge Dictionary:
a person who tries in an unofficial way to prevent crime, or to catch and punish someone who has committed a crime, especially because they do not think that official organizations, such as the police, are controlling crime effectively. Vigilantes usually join together to form groups
While not a perfect match, it works in your example. In a broad sense it falls short of meeting your requirements as actions taken in pursuit of a perceived greater good are not always kind, nor are isolated acts of kindness always of noble intent.
Vigilantism by definition necessitates acting outside of the law of the land. Whether or not this constitutes corruption varies according to circumstance. In the instance of someone being a law enforcement officer as you described, explicitly acting outside of the law in pursuit of one's own ideals would usually imply a high degree of corruption.
A fairly recent examplesexample from popular culture would be the lead character from Dexter:
the series centers on Dexter Morgan (Michael C. Hall), a forensic technician specializing in blood spatter pattern analysis for the fictional Miami Metro Police Department, who leads a secret parallel life as a vigilante serial killer, hunting down murderers who have slipped through the cracks of the justice system
Corruption often involves personal gain. Another recent example which more clearly highlights the personal gain aspect would be Raymond Redington from The Blacklist:
Raymond "Red" Reddington (James Spader), a former U.S. Navy officer turned high-profile criminal, voluntarily surrenders to the FBI after eluding capture for decades. He tells the FBI that he has a list of the most dangerous criminals in the world that he has compiled over the years and is willing to inform on their operations in exchange for immunity from prosecution