The film begins with the Joker robbing a mob-owned bank, and systematically double crossing his accomplices so he can have all the money. That night, multiple Batman impersonators interrupt a meeting between mobsters and the Scarecrow. The real Batman shows up and subdues everyone, but injuries suffered during the confrontation lead him to design a new, more versatile suit of armor. Batman and Lieutenant James Gordon contemplate bringing new district attorney Harvey Dent in on their plan to eradicate the mob, and the possibility that Dent will become the hero to the people that Batman cannot be. At the same time, Bruce Wayne and Harvey are both competing for the love of Rachel Dawes. The mob bosses meet to discuss how to handle Batman, Gordon, and Dent, while a Chinese mobster accountant, Lau, lets the gang leaders know he has taken their money to Hong Kong to prevent the police and the district attorney from seizing it in an imminent bank raid. The Joker arrives and proposes to kill Batman for them, and also tries to convince them that Lau will give them all up to the police if he is caught.
After Batman successfully abducts Lau in Hong Kong and delivers him to the Gotham City police, the mobsters agree to pay the Joker half of their money in return for killing Batman. The Joker tells all of Gotham that if the Batman does not turn himself in to the police, that more people will die each day. When the Joker begins killing off public officials, including Commissioner Loeb, despite the best efforts of the police and Batman to stop him, Wayne decides to turn himself in to the police. Before he can do so, Dent publicly admits to being "the Batman" to draw the Joker out of hiding. The Joker attempts to kill Dent during transport, but Gordon and Batman intervene in time to stop and arrest him. With the Joker in custody, Batman interrogates the Joker until he reveals that Rachel and Dent have been taken to opposite sides of the city, far-enough apart that Batman does not have time to save both of them. Batman speeds off to save Rachel, while Gordon and the police head after Dent. Unknown to them, the Joker has switched the locations, sending Batman after Dent and Gordon after Rachel. With the help of a pre-planted phone bomb, the Joker escapes with Lau in tow. Batman arrives and rescues Dent just as both buildings explode, although the left side of Dent's face is burned during the explosion. Gordon does not reach Rachel in time and she dies in the explosion. In the hospital, Dent is driven to madness over the loss of Rachel, which he blames on Batman, Gordon and the Joker. The Joker frees Harvey from the hospital and convinces him to exact revenge on the cops, mobsters, Gordon and Batman.
While "Harvey Two-Face" confronts the corrupt cops and the mobsters one by one, flipping a coin to decide their fates, the Joker burns Lau along with the mob's money. The Joker then declares that he will rule the streets and that anyone left in Gotham at nightfall will be subject to his rule. The Joker plants explosives on two ferries of evacuees and gives the passengers on board the chance to destroy the opposing vessel, one full of prison convicts and another with civilians, in order to save their own lives. Batman tracks the Joker to an uncompleted skyscraper. Batman prevents the Joker from blowing up the ferries when both vessels' occupants decide they would rather not sacrifice the lives of the passengers in the other vessel for their own.
Following a brief hand-to-hand fight the Joker acknowledges that Batman really is incorruptible, but that Dent was not, and that he has unleashed Harvey's madness upon the city. Batman finds Gordon and his family with Dent at the building where Rachel died. Two-Face proceeds to judge Batman, himself, and Gordon's son through the chance of a coin flip, which he sees as the only fairness left in the world. Two-Face shoots Batman in the stomach, but before he can determine the boy's fate, Batman tackles him over the side of the building, saving Gordon's son. As Dent lies motionless on the ground, Batman and Gordon decide that the Joker would win if anyone found out about Dent's corruption and madness. Batman convinces Gordon to let him take all the blame for Dent's murders in order to preserve the former district attorney's image as Gotham's hero and give the city hope. As Gordon destroys the Bat-Signal, a manhunt is issued for Batman.