Eight years after the death of District Attorney Harvey Dent, Batman has disappeared and organized crime has been eradicated in Gotham City thanks to the Dent Act. Police Commissioner James Gordon has kept secret Dent's murderous rampage and allowed blame for his crimes to fall on Batman. He writes a resignation speech revealing the truth, but decides that the city is not ready to hear it.
Bruce Wayne has become a recluse, and Wayne Enterprises is losing profits after Wayne discontinued his fusion reactor project when he learned that it could be weaponized. Cat burglar Selina Kyle obtains Wayne's fingerprints from his home and tries to sell the fingerprints to Wayne's corporate rival John Daggett. She is double-crossed at the exchange, but alerts the police. Gordon and the police arrive and pursue Daggett's henchmen into the sewers while Selina flees. The men capture Gordon and take him to Bane, a mysterious masked figure and former member of the League of Shadows, who has set up his base in the sewers. Gordon escapes and is found by rookie officer John Blake. Blake, a fellow orphan, confronts Bruce and convinces him to return as Batman.
Bane attacks the Gotham Stock Exchange by using Wayne's fingerprints in a transaction that leaves Wayne bankrupt. Wayne's butler, Alfred Pennyworth, reveals that Rachel Dawes had intended to marry Dent before she died, and then resigns in an attempt to convince Bruce to move on with his life. Wayne finds comfort in Wayne Enterprises CEO Miranda Tate, who becomes his lover.
Kyle agrees to take Batman to Bane but instead leads him into Bane's trap. Bane reveals that he intends to fulfill Ra's al Ghul's mission to destroy Gotham, and then steals Batman's technology from Wayne Enterprises. Bane fights Batman and delivers a crippling blow to his back, before taking him abroad to an underground prison. There, the inmates tell Wayne the story of Ra's al Ghul's child, who was born and raised in the prison before finally escaping — the only prisoner to have done so.
Bane lures Gotham's police underground and uses explosives to trap them and destroy the bridges surrounding the city. He kills Mayor Anthony Garcia and forces a nuclear physicist to convert the reactor core into an atomic bomb before killing him as well. Bane reads Gordon's speech to the public, and releases the prisoners of Blackgate Penitentiary, initiating chaos while holding the city hostage and isolated with the bomb.
Months later, a recovered Wayne escapes from the prison and returns to Gotham. Batman frees the trapped police and they clash with Bane's army in the streets; during the battle, Batman overpowers Bane. Tate intervenes and stabs Batman, revealing herself to be Talia al Ghul, Ra's al Ghul's daughter. She activates the detonator, but Gordon blocks her signal. Talia leaves to find the bomb while Bane prepares to kill Batman, but Kyle arrives and kills Bane. Batman and Kyle pursue Talia, hoping to bring the bomb back to the reactor chamber where it can be stabilized. Talia's truck crashes, but she remotely floods and destroys the reactor chamber before dying. With no way to stop the detonation, Batman uses the Bat to haul the bomb far over the bay, where it safely explodes. Before takeoff, Batman reveals his identity to Gordon by mentioning the night his parents were shot as he was on duty at that time and comforted young Bruce afterward.
In the aftermath, Batman is presumed dead and is honored as a hero. With Wayne presumed dead as well, Wayne Manor becomes an orphanage, and his remaining estate is left to Alfred. Gordon finds the previously destroyed Bat Signal repaired, while Lucius Fox discovers that Wayne had fixed the previously malfunctioning auto-pilot on the Bat. While visiting Florence, Alfred discovers that Wayne is alive, and in a relationship with Kyle. Blake resigns from the police force and, in accordance with Wayne's will, inherits the Batcave.