Charles Hynes, an aggressive crime fighter who has been praised for his innovative community initiatives, leaves office on Dec. 31 after having been repudiated by voters who had chosen him six times as Brooklyn’s top prosecutor.

The district attorney, who insists that he “made Brooklyn safer,” will leave behind a legacy that has been muddied by reports of prosecutorial misconduct and wrongful convictions on his watch.