In Gotham City, the Joker and his accomplices rob a bank used by the local mob as a front for money laundering. Batman and Lieutenant James Gordon decide to include new district attorneyHarvey Dent, who is dating Bruce Wayne’s childhood sweetheart Rachel Dawes, in their plan to eradicate the mob. Bruce later meets Dent and offers him a fundraiser after realizing his sincerity. Mob bosses Sal Maroni, Gambol, and the Chechen meet to discuss the new pressure on their crime operations. Lau, a Chinese mafia accountant, informs them that he has hidden their money and fled to Hong Kong in an attempt to preempt Gordon’s plan to seize their funds and hide from Dent’s jurisdiction. The Joker barges into the meeting, warning that Batman will come after Lau, and instead offers to kill Batman for half of the funds. They flatly refuse, and Gambol places a bounty on the Joker’s head. Not long after, the Joker kills Gambol and takes control of his gang.
Batman captures Lau in Hong Kong and delivers him to the Gotham City police; he agrees to testify, allowing Dent and Gordon to arrest the mobsters en masse. In retaliation, the Joker issues an ultimatum to Gotham that people will die each day unless Batman reveals his identity; he immediately makes good on his threat, killing Commissioner Gillian B. Loeb and the judge presiding over the mob trials. Gordon foils the Joker’s assassination attempt on the mayor, apparently dying in the process. As a result, Bruce plans to reveal his identity as Batman, but Dent instead names himself as Batman to protect the truth and is taken into protective custody. Escorted across the city, Dent is pursued by the Joker while Batman rushes to his aid. Gordon, who had faked his death, arrests the Joker with Batman’s help and is promoted to Commissioner. However, Dent goes missing and the Joker reveals that both Dent and Rachel have been taken to separate buildings on opposite sides of town which will explode at the same time. Batman goes after Rachel, while Gordon and the police go to rescue Dent. At the same time, the Joker escapes custody with Lau using a smuggled bomb. As the Joker has switched around the hostages’ locations, Batman finds Dent and rescues him, even as Dent begs him to save Rachel instead. The buildings explode; Rachel is killed, while half of Dent’s face is burned in the explosion, leaving him disfigured.
After killing Lau and the Chechen, the Joker threatens to destroy a hospital if Coleman Reese, an accountant at Wayne Enterprises who has deduced Batman’s identity, is not dead within an hour. Bruce saves Reese, while the Joker visits Dent in the hospital and convinces him to take revenge against those who played a part in Rachel’s death. The Joker blows up the hospital and leaves with a bus full of hostages, while Dent confronts and kills Maroni and the two corrupt cops who gave him and Rachel to the mob.
That night, as civilians are evacuated from the city, the Joker has two ferries rigged with explosives, offering both civilian and prisoner passenger groups a chance to live if they destroy the other boat. Batman asks his confidant Lucius Fox to find the Joker using a signal tracking device that will effectively spy on the entire city; Fox reluctantly agrees, but says he will resign from Wayne Enterprises immediately afterward if the machine remains intact. Upon discovering the Joker’s location, Batman stops Gordon’s SWAT teams from taking the criminal out, in order to protect the hostages and to capture the Joker himself. The ferry passengers ultimately refuse to kill one another, and Batman apprehends the Joker, who nevertheless says that he has won “the battle for Gotham’s soul”; he reveals what he has done to Dent, stating that the citizens of Gotham will lose their newly found hope once Dent’s rampage becomes public knowledge. Batman leaves to track Dent down as the Joker is taken back into custody by the SWAT team.
At the remains of the building where Rachel died, Batman finds Dent holding Gordon and his family at gunpoint. Dent judges the fate of Batman, himself, and Gordon’s son with three flips of his lucky coin. As the result of the first two flips, he shoots Batman in the abdomen and spares himself. As Dent flips the coin to determine the boy’s fate, Batman (who is wearing body armor) tackles him over the side of the building, killing him. Batman convinces Gordon to hold him publicly responsible for the murders so that Dent will remain a symbol of hope for the city; moments later, the police swarm the building, and a manhunt for Batman ensues. Batman retreats on the Batpod, now a fugitive. Gordon later delivers the eulogy at Dent’s funeral and destroys the Bat-Signal, while Fox watches the signal-tracking device self-destruct and Alfred Pennyworth burns the letter written by Rachel revealing her plans to marry Dent.