Aged eight, Bruce Wayne falls into a cave where he is attacked by a swarm of bats. Bruce develops a fear of bats, and later urges his parents to leave an opera featuring bat-like creatures. Outside the theater, Bruce Wayne's parents are both killed in a robbery by mugger Joe Chill. Bruce blames himself for his parents' murder: had he not been frightened, the Waynes would not have encountered Chill.
After coming of age, Bruce returns to Gotham City from Princeton University intent on killing Chill, whose prison sentence is being suspended in exchange for testifying against mob boss Carmine Falcone. One of Falcone's henchmen kills Chill. Bruce tells his childhood friend Rachel Dawes about his foiled plan, and she expresses disgust for his blind vengeance without regard for justice. Bruce confronts Falcone, who tells him that he is ignorant of the nature of crime, so Bruce decides to travel the world for nearly seven years to understand the criminal mind. He is eventually detained in China for theft, where Ducard invites Bruce to join an elite vigilante group, the League of Shadows, led by Ra's al Ghul. Bruce is freed and travels to a mountaintop to begin his combat training with the League, who intend to use him to destroy Gotham. Bruce passes all the League's training, overcoming his childhood phobia in the process, but when ordered to execute a criminal, he turns on the League, destroying their headquarters and accidentally killing Ra's al Ghul. Bruce rescues an unconscious Ducard from the wreckage and leaves his mentor at a nearby village.
Bruce Wayne returns to a Gotham City that is mostly ruled by Falcone and begins plotting a one-man war against the corrupt system. He seeks the help of Rachel, now an assistant district attorney, and police sergeant Jim Gordon, who consoled him in the aftermath of his parents' murder. After reestablishing his connections to his father's company, Wayne Enterprises, Bruce is able to acquire, with the help of former board member Lucius Fox, a prototype armored car and an experimental armored suit. In his new Batman costume, he disrupts a drug shipment by Falcone and leaves the mob boss tied to a searchlight, forming a makeshift Bat-Signal. He also disrupts an assassination attempt on Dawes, leaving her with evidence against a judge who has previously gone soft on Falcone. While investigating the "unusual" drugs in the shipment, Batman is stunned by sinister psychopharmacologist Dr. Jonathan Crane, who sprays him with a powerful hallucinogen. Bruce's butler Alfred Pennyworth rescues Bruce, who receives an anti-toxin developed by Fox. Crane later poisons Rachel after showing her that the toxin, which is harmful only in vapor form, is being piped into Gotham's water supply. Batman saves her. The police enter Arkham Asylum and arrest Crane while Batman escapes with Rachel. After administering the antidote to Rachel in the batcave, he gives her two vials of it for Gordon – one for the detective to inoculate himself, and another to mass produce for the city's population.
At a party held at Wayne Manor, Bruce is confronted by a group of League of Shadows ninjas led by Ducard, who reveals himself to be the real Ra's al Ghul, the man killed earlier being a decoy. Ra's, who had been conspiring with Crane, plans to destroy Gotham by distributing the toxin undetected via Gotham's water supply and then vaporizing it with a microwave emitter stolen from Wayne Enterprises. Bruce, tricking his guests into leaving, fights briefly with Ra's while the League of Shadows set fire to Wayne Manor. Bruce escapes the inferno with Alfred's help just as the manor is destroyed. Batman arrives at the "Narrows" section of Gotham to aid the police in battling psychotic criminals, including Crane, who the League set free from the asylum. Rachel is confronted by but wards off Crane; Batman rescues Rachel when more criminals go after her. Batman intimates his identity to her while leaving Gordon in control of the Batmobile to stop the elevated train that is being used to transport the vaporizer to the city's central water hub. Batman battles Ra's aboard the train, then escapes just as Gordon topples the elevated line using the Batmobile's missiles, leaving Ra's to crash to the ground with the train.
Following the battle, Batman becomes a public hero. Bruce gains control of Wayne Enterprises and installs Fox as CEO, firing Earle. However, he is unable to hold onto Rachel, who cannot reconcile her love for Bruce Wayne with his dual life as Batman. Gordon, newly promoted to lieutenant, unveils a Bat-Signal for Batman. Gordon mentions a criminal who, like Batman, has "a taste for the theatrical", leaving a Joker playing card at his crime scenes. Batman promises to investigate it. As Batman is leaving, Gordon mentions that he hasn't thanked Batman for what he has done. Batman replies that Gordon will never have to, and flies off into Gotham.