The criminals of Gotham City are running scared, because Batman is keeping the good citizens of Gotham safe. The film opens with a gang of men wearing clown masks breaking into the bank where the mob keeps much of their money. The mastermind of the heist is someone named the Joker. At the end of the heist, Joker arrives and puts a grenade in the mouth of the bank manager.
Unaware of the Joker's presence in their city, Batman and the new DA, Harvey Dent, are working alongside Lieutenant Gordon to put the last of the mob's money-laundering enterprises out of business once and for all. They believe they have definitively stopped the laundering and crime in the city—until the Joker shows up to sow chaos. Joker assassinates a judge, plants a bomb in a hospital and blows it up, and starts knocking off innocent people in Gotham one by one until Batman reveals his identity.
Batman is determined to fight back against the Joker. For a while, it seems as though he is maintaining the upper hand, until his best friend Rachel, who also happens to be Harvey Dent's girlfriend, is killed in the crossfire. When half of Harvey Dent's face gets burned in an explosion, the Joker brings him over to the dark side, encouraging him to seek vengeance for Rachel's death. Harvey adopts a new name, Two-Face, and Batman finds himself with two madmen to contend with as the destruction of Gotham looms large.
The Joker has clearly been planning his takeover of Gotham for quite some time, and seems to be at least two steps ahead of Batman at every turn. After releasing a threat to the entire city of Gotham, he commandeers two ferries and fills one with citizens and one with convicted criminals. He also fills both ferries with explosives. He gives each boat a master detonator that will explode the other ferry. If nobody detonates the other boat by midnight, he says, he will blow up both boats. Batman is eventually able to subdue the evil clown and none of the passengers on the ferries are harmed.
Harvey is still on the Joker's side, something that Batman did not realize in his haste to take down the Joker himself. While Batman has been confronting Joker, Gordon learns that his family has been taken hostage by Two-Face. When Gordon goes to save them, Two-Face knocks Gordon to the ground, then grabs his little boy, Jimmy, planning on flipping a coin to decide the boy's fate by chance. Suddenly, Batman arrives and orders him to stop, telling him that he is blaming the wrong people for Rachel's death. Two-Face then flips the coin for Batman. It lands dirty side up, so he shoots him. He flips it for himself. It lands clean side up. Then he resumes with his original plan and flips it for little Jimmy. In the definitive moment, Batman gets up and tackles Two-Face, knocking him over a ledge.
Batman bemoans the fact that the Joker still won because he corrupted Harvey Dent, split up their alliance for good, and destroyed one of the best people in Gotham. If the people of Gotham ever discovered the wrongs that Two-Face has done, Gotham's future will be compromised. Thus, Batman decides to take the blame for the murders that Dent committed as Two-Face, so that the Joker can't win and the city will stay peaceful.
Gordon is seen destroying the Bat symbol above the MCU building and then begins to chase Batman, who runs. Gordon tells his son that although Dent was the hero that Gotham needed, Batman is the hero that Gotham deserves. A manhunt is issued for Batman and he speeds away in his Batpod. Gordon declares, "He's a silent guardian. A watchful protector. A Dark Knight."