According to a series of contemporary articles in the "Los Angeles Times" and the "New York Times", Warner Bros. bought the rights to Jerome Odlum's 1938 novel of the same title as a vehicle for James Cagney with Edward G. Robinson to co-star. Robinson was then replaced by John Garfield, and Michael Curtiz was to direct. Eventually, Curtiz was replaced by William Keighley, and Fred MacMurray was to replace Garfield in the reporter's role. When MacMurray became unavailable, a screen test with Jeffrey Lynn was made. Finally, Raft was signed and swapped roles with Cagney, so Raft became the gangster and Cagney the reporter.
The idea for using guns smuggled in twine for the prison break was likely inspired by the real life Michigan City prison escape in Michigan City, Indiana on September 26th, 1933. In that escape, notorious bank robber John Dillinger smuggled guns into the prison where his friends, Harry Pierpont, "Red" Hamilton, Charles Mackley, Russell Clark, and others worked in the shirt factory. Unlike the failed attempt in the film, Pierpont and the others managed to quietly take the prison guards on duty in the workshop hostage and then peacefully marched to the administration building under the guise of guards escorting prisoners. Once inside the administration building, they quietly locked up the guards, warden, and staff then walked out of the front door and stole staff cars to escape. While most of the men involved were either recaptured or killed by police, the core group of Pierpont, Hamilton, Mackley, and Clark rejoined with Dillinger to form his gang. The men would eventually be killed or captured later on.
Early in this film, there is a scene of a car accident at night. The overhead camera footage of the car accident, location, people on the street, shops, lights, poles etc. is the exactly the same in both films, Each Dawn I Die (1939) and I Was Framed (1942).
Although it was already commonplace to say, "You dirty rat!" when impersonating Jimmy Cagney at this time, Cagney himself, never said it. He did say, "You dirty, yellow-bellied rat!" in Taxi (1931). Perhaps it was an inside joke, but several characters say, "You dirty rat(s)!" throughout this film, including a guard saying it to Cagney.