The film opens in 1933 as John Dillinger (Johnny Depp) is brought to the Indiana State Prison by his partner John "Red" Hamilton (Jason Clarke), under the disguise of a prisoner drop (with Dillinger posing as the prisoner). Inside the prison, several gang members, Charles Makley (Christian Stolte), Harry Pierpont (David Wenham), Ed Shouse (Michael Vieau), Homer Van Meter (Stephen Dorff), and Walter Dietrich (James Russo) acquire guns smuggled into the prison inside boxes of thread sent to the prison's shirt factory, with which they take a few guards hostage and march them to the changing rooms. At the same time, the warden that meets Dillinger and Hamilton suddenly recognizes Dillinger. Dillinger admits to his identity, and at this point, he suddenly springs his handcuffs off, and he and Hamilton conjure shotguns and force the warden to open the door to the break room at gunpoint, at the moment that the other inmates come in. They force the guards to take off their uniforms at gunpoint. Everything goes as planned until Shouse suddenly beats a guard to death in a fit of rage and another guard gets shot. A running shootout ensues as the men run towards the waiting car. Unfortunately, a sniper on the wall shoots Dietrich in the back just as he is about to get into the car, mortally wounding him, and a furious Dillinger kicks Shouse out of the car.
In East Liverpool, Ohio, Melvin Purvis (Christian Bale) and several other FBI agents are running down Pretty Boy Floyd (Channing Tatum). As Floyd sprints through an apple orchard, Purvis aims a rifle at him, fires one round, and misses, as Floyd fires back a burst from his Thompson submachine gun. Purvis sets his sights, aims, and fires again. The bullet goes straight through Floyd's chest and mortally wounds him.
Meanwhile, Dillinger's gang reaches a hideout, where crooked Chicago cop Martin Zarkovich (John Michael Bolger) convinces them to hide out in Chicago, where they can be sheltered by the Mafia. Dillinger exchanges brief words with a Mafia car dealer and close acquaintance Anna Sage (Branka Katic).
We next see Dillinger, Pierpont and Makley walking up the stairs into the lobby of a bank in Racine, Wisconsin, wearing dull overcoats and bowler hats. Pierpont, the lobby man, overpowers one of the guards and orders everyone to get on the floor, while Dillinger leaps over a railing, grabs the bank manager, and plays "Spin the Dial," by marching him to the vault at gunpoint. Makley clears money from the teller cages into a duffel bag. When the manager appears to be stalling, Dillinger strikes him over the head with a pistol and gives him the choice of being a dead hero or a live coward. The manager complies.
Outside, we see Van Meter acting as the lookout, hiding a rifle under his coat. He turns to his left at the sound of screeching tires and sees a car pull to a stop in the middle of the street. He quietly backs into the doorway and taps his rifle against the door to inform the robbers inside that they have company. The men inside do not stop working, though, as the money bags are thrown to Pierpont, and Dillinger takes the bank manager as a hostage. He notices a customer with some spare money out and assures him, "I'm not here for your money, I'm here for the bank's."
In the car, Hamilton, the getaway driver, checks his watch, and pulls forward just as the first cops climb out of their vehicle and run towards the bank. As the first cop reaches the door and tells him to leave, Van Meter asks "What for?" Before the cop can react, Van Meter suddenly whips out his rifle, strikes the cop across the neck (knocking off the cop's peaked cap), and locks him into a chokehold with his left hand, levels his rifle over the cop's right shoulder, and fires on the police. As pedestrians flee the scene, Dillinger, Pierpont and Makley exit the bank with their own hostages. The shields keep the police from firing on the robbers, until a detective fires a pistol. With their Thompson submachine guns, the robbers mow down the cops and speed away, dumping their hostages on the outskirts of town.
In Washington, DC, BOI director J. Edgar Hoover (Billy Crudup) is frustrated after his latest request for additional funding is turned down, after he admits that he has not made a single arrest in his lifetime. Struggling to expand his Bureau into a national police agency, he meets with Purvis, and assigns him to lead the manhunt for John Dillinger, announcing to reporters that he is declaring the first "War on Crime".
In Chicago, Dillinger meets Billie Frechette (Marion Cotillard), his love interest, at a restaurant, and proceeds to woo her by buying her a fur coat. Frechette falls for Dillinger even after he tells her who he is, and the two quickly become inseperable.
Purvis and his men, meanwhile, trace the overcoat that Dillinger gave to a female bank teller hostage as a souvenir and also track down the car dealer. Tracing the car, he leads a failed ambush at a hotel where he believes Dillinger is staying. One agent, Warren Barton, is gunned down by trigger-happy Baby Face Nelson (Stephen Graham), who then escapes after a shootout.
The next day, Dillinger, Pierpont and Makley walk into another bank, wearing overcoats to hide their guns. Dillinger and Pierpont walk towards one guard, whom Pierpont overpowers at the same moment that Dillinger whips out pistols in each hand. As Pierpont and Makley handle the lobby, Dillinger leads the bank manager over to the vault at gunpoint, training one gun on the manager and one on the lobby.
That night, Hoover is seen reprimanding Purvis for his bungled attempt to arrest Nelson. Purvis demands that Hoover bring in professional lawmen who know how to catch criminals dead or alive, including Texas "cowboy" Charles Winstead (Stephen Lang). We later see Purvis greeting Winstead and the other new arrivals when they arrive at Union Station.
Meanwhile, Dillinger, Billie and the members of Dillinger's gang spend some time in Florida watching horse races, then lay low in Tucson. While Dillinger and Billie are in their hotel room, three men with shotguns burst in and arrest Dillinger. Dillinger learns from Pierpont and Makley, who have also been arrested, that a fire broke out in their hotel room, the firefighters found their guns, and turned them in to the police.
Dillinger is extradited back to Indiana where he is locked up pending trial. A syndicate lawyer, Louis Piquett, manages to convince the trial judge to keep Dillinger locked up in the Lake County Jail in Crown Point. Dillinger eventually escapes from Crown Point on March 3, a week before his trial, with another inmate, Herbert Youngblood, by carving a fake wooden gun, tricking a guard into opening his cell, then overpowering the other guards and escapes in Sheriff Lillian Holley's car.
Dillinger is unable to see Frechette, who is under tight surveillance. Dillinger learns that Frank Nitti's (Bill Camp) Chicago Outfit associates are now unwilling to help him. And for a good reason: Dillinger's crimes are motivating the government to begin prosecuting interstate crime as a federal offense, which imperils Nitti's lucrative bookmaking racket.
Later, Dillinger meets fellow bank robber Tommy Carroll (Spencer Garrett) in a movie theater; with him is Ed Shouse, who wants to rejoin the gang. Carroll goads Dillinger into a bank robbery job in Sioux Falls, South Dakota, promising a huge score. Even though Baby Face Nelson is involved, whom he doesn't like, Dillinger agrees, since he intends to use the money to break Pierpont and Makley out of prison.
We next cut to a motorcycle cop pulling up on a street corner, where pedestrians are gathered, watching something with great interest. As the cop dismounts, gunshots suddenly ring out and pedestrians scatter as the cop falls, struck four times. The gunfire is Nelson, inside the bank, firing through a plate glass window. He screams "I got one!", laughs maniacally, and then fires another volley into the ceiling. Van Meter, startled by the noise, quickly grabs a hostage outside the bank while the men inside the bank just look oddly at Nelson. Frustrated at the fact that there is less money than they wanted, Dillinger grabs this bank manager and other hostages and they begin to leave. But as they leave, Nelson suddenly opens fire, sparking a shootout with police and vigilantes up and down the street. Dillinger is shot in the arm, and Carroll is shot in the head and left for dead. The men climb into their car, and retreat to a hideout at Little Bohemia Lodge in Manitowish Waters, Wisconsin. Dillinger expresses hope he can free the rest of his gang still in prison, including Pierpont and Makley, but Red convinces him this is unlikely to happen.
Purvis and his men apprehend Carroll (who is still alive) and torture him to find the rest of the gang's location, despite the doctor's insistence on giving Carroll medication (and Purvis threatening to run him in for obstruction of justice if he tried to intervene).
They arrive at Little Bohemia and Purvis organizes another failed ambush. Unfortunately, when a car leaves the lodge containing three locals, they mistake it for the robbers' vehicle, and they end up accidentally killing a few innocent civilians and tipping off the inhabitants inside. In the shootout that follows, Dillinger and Red escape separately from Nelson and the rest of the gang. Agents Charles Winstead and Clarence Hurt (Don Frye) pursue Dillinger and Hamilton through the woods on foot, engaging them in a running gun battle in which Red is mortally wounded.
Down the road, Nelson shoots and kills Purvis's partner Carter Baum (Rory Cochrane) and steals his car. Purvis and another agent, Johnny Madala, hop onto an arriving BOI car and chase down Nelson, who picks up Shouse and Van Meter. As the BOI car closes in on the gangsters' car, Purvis opens fire from the running boards with his Thompson submachine gun. Van Meter returns fire with a BAR rifle until it jams. Purvis fires a shot that hits the radiator and causes Nelson to lose control of the car and skid off the road into a field, where it flips over twice before coming to a stop. Shouse is killed by the crash. Van Meter gets out of the car and tries to make a break for it, but is gunned down by Purvis. Nelson gets out and opens fire, and another agent is shot dead as he tries to draw a submachine gun. Simultaneously, Purvis fires his pistol and Madala fires a shotgun, both rounds hitting Nelson, who briefly falls over but continues to fire. Purvis continues to fire his pistol into Nelson until he finally falls to the ground, dead.
Further down the road, Dillinger and Hamilton steal a farmer's car and make good their escape; Hamilton dies later that night and Dillinger buries his body, covering it in lye.
Dillinger manages to meet Frechette, telling her he plans to do one last job that will pay enough for them to escape together. However, Dillinger drops her off at a hotel he thinks is safe and helplessly watches as she is captured. Tears sting his eyes as he drives away, unnoticed by the feds.
An interrogator, Agent Harold Reinecke (Adam Mucci) viciously beats Frechette to learn Dillinger's whereabouts, but she refuses to talk; Purvis and Winstead arrive and angrily break up the interrogation. Meanwhile, Dillinger is meeting with Alvin Karpis (Giovanni Ribisi), who tries to recruit a disinterested Dillinger in a train robbery with his associates, the Barker Gang. Dillinger receives a note from Billie through his lawyer, Louis Piquett (Peter Gerety), telling him not to try and break her out of jail.
Through crooked cop Zarkovich, Purvis enlists the help of Anna Sage, who is facing inevitable deportation and wants to set up Dillinger in an attempt to stay in the United States.
The agents only know that there are two possible theaters Dillinger could be going to: the Biograph Theater, which is showing the Clark Gable gangster film Manhattan Melodrama, or the Marbro, which is showing the Shirley Temple movie Little Miss Marple. Ultimately, it is the former theater.
When the movie is over, Dillinger, Sage, and his girlfriend Polly Hamilton, leave as Purvis and his men move in. Dillinger spots the police and tries to draw his gun, but is hit at least four times. Two bullets only nick him, while another goes through his chest, while the fourth and fatal shot enters Dillinger through the back of his head, tears through his spinal cord and brain, and exits above his right eye. Winstead leans down to see if Dillinger is saying something as he dies, but tells Purvis that he couldn't hear a thing.
Later, Winstead meets Frechette in prison. He tells her that Dillinger's dying words were "Tell Billie for me, 'Bye bye Blackbird.'" The closing text reveals that Melvin Purvis quit the FBI shortly afterwards and died by his own hand in 1960, and that Billie lived out of the rest of her life in Wisconsin following her release in 1936, and died in 1970.