The movie opens with some CIA agents escorting a nuclear scientist, Dr Pavel, and three hooded prisoners, on board a small military aircraft. On learning that the prisoners worked for a mercenary named Bane, the agent in charge of the operation is excited and begins interrogating the prisoners. However, one of the prisoners turns out to be Bane (Tom Hardy) himself, and getting arrested was part of his plan. Suddenly, the aircraft is overpowered by a very large aircraft, from which several of Bane's men climb into the smaller aircraft using ropes, killing the agents.
Then, Bane and his men attack the Gotham stock exchange, taking everybody inside hostage, and manipulating the Wayne Enterprises stock using Bruce's fingerprints (stolen by Selina and sold to Dagget) causing the company to go bust financially. The hostage situation ends with the mercenaries getting away, but Batman enters the scene suddenly, causing the Gotham Police force to concentrate all their resources into arresting him. Deputy Commissioner Foley (Matthew Modine) is eager to arrest the alleged murderer of Harvey Dent, and after a prolonged chase, Batman is cornered into a dark alley. But Batman escapes from the alley in The Bat, a futuristic flying version of the Batmobile built by Lucius Fox (Morgan Freeman).
To avoid the company shutting down, Bruce and Fox take Miranda to the fusion reactor designed by Dr Pavel, to convince her to invest in the project. This reactor was originally intended as a weapon, but Fox and Miranda intend to use it for generating clean free energy for the entire city.
Meanwhile, Selina is afraid of Bane and the havoc he's planning to unleash, and to save her life from him, deceives Batman into following her into the sewers, where he is cornered by Bane. Bruce Wayne is then dumped into a prison, paralysed from the back downwards, and Bane tells him that he intends to kill his soul first, and his body only later. This prison was where Bane was rumoured to be born, and it is notorious as the "Hell on Earth", from where nobody has managed to escape, except Bane as a kid. Men routinely try to escape using a rope and climbing to the top, but everybody fails to clear the final jump on to a ledge required to escape.
In Gotham City, the entire police force consisting of a thousand policemen storm the sewers to capture Bane. Bane, however, has rigged the entire sewer system with explosives, which he detonates at the beginning of a football match, causing the entire ground to cave in and collapse, and his people take the entire audience hostage. The explosives cause the sewers to cave in, leaving the entire police force of the city trapped inside. Bane then declares to the stadium crowd that he's now in charge of the city, and having taken control of the nuclear reactor, which he has turned into a bomb, murders Dr Pavel in front of the shocked audience, after telling them that Dr Pavel was the only man who could disarm the nuclear device.
Bane then proceeds to the prison where more than a 1000 prisoners have been incarcerated as per the Dent Act, which gave enormous powers to the police. Here he reads out Gordon's intended speech revealing the truth about Harvey, and declares the prisoners free, as the man who drew up the Dent Act himself was a murderer and a madman. The prisoners join Bane and together they enforce what Bane calls "martial law", forcing the rich out of their homes, holding kangaroo courts and killing anybody who could cause any resistance by forcing them to walk on the frozen river, until the ice breaks and they sink.
Meanwhile, Bruce Wayne, holed up in the prison, is watching the havoc in Gotham on a TV set in the prison. Bruce returns to Gotham as Batman, and with the help of Selina, frees Miranda and Fox from Bane's captivity, and saves Gordon and some of the policemen, who had been captured and were about to be killed on the frozen river. Fox reveals that trigger or no trigger, the nuclear device will detonate anyway within a few hours, and builds a signal jammer which can block the signals from the trigger.
With Blake's help, Batman frees the policemen trapped in the sewers, who then march the streets and attack Bane's army. A brutal combat ensues on the streets of Gotham. Meanwhile Batman fights Bane again, and has nearly defeated him, when Miranda stabs the Batman from behind. Alfred is very upset and sobbing because he feels he let Bruce down.
In the epilogue, Lucious Fox is shown completing work on the Bat, realizing that Batman may have escaped the detonation after all due to the fact the autopilot was fixed by Bruce many months before. Alfred is also shown holidaying in France, where he sees Bruce Wayne and Selina Kyle having coffee together at a nearby table. It is also revealed that John Blake is Robin, and the movie ends with him walking into Batman's secret hideout in the cave behind the waterfall. We are reminded of an earlier dialogue where Batman tells Blake that the Batman is just a symbol, and anybody can take on that role, causing us to wonder if it is implied that Blake/Robin takes over from the Batman.