As Richard's answer to this question shows, if it became known that Harvey Dent was dirty, the mass arrests he authorized under RICO laws would have been overturned and the criminals set free.
But long before Dent became Two Face and started killing people, he had already incriminated himself twice, including once in an incredibly public forum, with horrific consequences:
When Gordon saved the mayor from assassination, Dent stole an ambulance and illegally interrogated a mentally ill (and therefore, not criminally culpable) man at gunpoint. Crimes Committed: Assault with a deadly weapon; Grand theft auto; wrongful imprisonment; aggravated vehicle theft; obstructing EMS; reckless driving [he drove away with the back doors open]; criminal mischief; attempted motor vehicle theft; battery; malfeasance in office; death threats; witness tampering; attempt to coerce; among others.
In the middle of an extremely high profile press conference, he falsely claimed to be Batman, and allowed himself to be arrested. Crimes Committed: Filing a false police report; Obstruction of justice; Malfeasance in office; among others.
In the process of his transfer to Central Processing, en route to lockup, several police officers were killed trying to protect him. Crimes Committed: Possibly Unwitting accessory to murder of peace officers; perhaps others.
After Batman showed up and caught The Joker, Harvey (and Gordon) let him walk away. Accomplice to [every crime Batman has committed or will commit]; Obstruction of justice; interfering with a police investigation; malfeasance in office; among others.
Why wouldn't this laundry list of serious crimes, many of which are felonies, be enough to prove that Harvey Dent was "dirty"?