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. Dillinger and Hamilton overpower several guards and free members of their gang including Charles Makley (Christian Stolte) and Harry Pierpont (David Wenham). The jailbreak goes off without a hitch, until gang member Ed Shouse (Michael Vieau) beats a guard to death. A shootout ensues as the gang makes its getaway. Dillinger's friend and mentor Walter Dietrich (James Russo) is killed, and a furious Dillinger kicks Shouse out of the car. The rest of the gang retreats to a farm house hideout, where crooked East Chicago, Indiana cop Martin Zarkovich (John Michael Bolger) convinces them to hide out in Chicago, where they can be sheltered by the local Mafia.
In East Liverpool, Ohio, Melvin Purvis (Christian Bale) and several other FBI agents are running down Pretty Boy Floyd (Channing Tatum). Purvis kills Floyd and is promoted by J. Edgar Hoover (Billy Crudup), who is struggling to expand his Bureau into a national police agency, to lead the hunt for John Dillinger, declaring the first national "War on Crime."
In between a series of bank robberies, including a violent one at the First National Bank in East Chicago, Indiana, where Dillinger kills an East Chicago cop, 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 inseparable.
Melvin Purvis leads a failed ambush at a hotel where he believes Dillinger is staying. An agent is shot and killed by the occupant. After the man escapes, Purvis realizes the killer wasn't Dillinger but Baby Face Nelson (Stephen Graham). After this incident, Purvis requests Hoover to bring in professional lawmen who know how to catch criminals dead or alive, including Texas "cowboy" Charles Winstead (Stephen Lang).
Police finally find Dillinger and arrest him and his gang in Tucson. Purvis arrives that evening and briefly talks with Dillinger; Dillinger tries to size Purvis up and manages to unnerve him with his talk about the agent killed by Nelson. Dillinger is extradited back to the Lake County Jail in Crown Point, Indiana, where he is locked up by Sherriff Lillian Holley (Lili Taylor) pending trial. Dillinger and a few inmates,chief among them is Herbert Youngblood (played by Michael Bentt), carve a fake wooden gun and use it to escape the jail in Sherriff Holley's Police Cruiser. 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; Dillinger's crimes are motivating the U.S. government to begin prosecuting interstate crime, 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, promising a huge score. Even though Baby Face Nelson is involved, whom he doesn't like, Dillinger agrees. A shootout (triggered by Nelson shooting a cop outside the bank) occurs in which Dillinger is shot in the arm, and Carroll is shot and left for dead. They retreat to Nelson's wilderness hideout in Manitowish Waters, Wisconsin, where Dillinger's wounds are treated; the gang is disappointed to find that their haul is only a fraction of what they expected. 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. They arrive at Little Bohemia and Purvis organizes another failed ambush, in which several civilians are killed in the cross-fire. Dillinger and Red escape separately from Nelson and the rest of the gang. Agents Winstead and Hurt (Don Frye) pursue Dillinger and Hamilton through the woods on foot, engaging them in a running gun battle in which Red is shot and fatally wounded. Trying to escape along the road, Nelson, Shouse and Homer Van Meter (Stephen Dorff) hijack an FBI car, killing several agents in the process, including Purvis's partner Carter Baum (Rory Cochrane). After a car chase, Purvis and his men kill Nelson and the rest of the gang. 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 by the FBI while sobbing. An interrogator, the brutish 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 abusive 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 Piquet (Peter Gerety), telling him not to try and break her out of jail.
Through crooked cop Zarkovich, Purvis enlists the help of a madam and Dillinger acquaintance Anna Sage (Branka Katic), threatening her with deportation if she is not cooperative. She agrees to set up Dillinger, who is hiding with Sage.