The character of Cody Jarrett was based on New York murderer Francis Crowley, who engaged in a pitched battle with police in the spring of 1931 at the age of 18. Before his execution in the electric chair on 1/21/32, Crowley's last words were, "Send my love to my mother."
It was James Cagney himself who had the idea of making Cody psychotic. Cagney attributed his performance to his father's alcoholic rages, which he had witnessed as a child, as well as someone that he had seen on a visit to a mental hospital.
If the surprise expressed by James Cagney's fellow inmates during "the telephone game" scene in the prison dining room appears real, it's because it was. Director Raoul Walsh didn't tell the rest of the cast what was about to happen, so Cagney's outburst caught them by surprise. In fact, Walsh himself didn't know what Cagney had planned; the scene as written wasn't working, and Cagney had an idea. He told Walsh to put the two biggest extras playing cons in the mess-hall next to him on the bench (he used their shoulders to boost himself onto the table) and to keep the cameras rolling no matter what happened.
The unusually close relationship between Cody Jarrett and his domineering mother was inspired by real-life bank robbers Kate Barker (aka "Ma Barker") and her sons.
Although James Cagney found this to be a good picture on a number of levels, in his 1985 autobiography he called it "another cheapjack job" because of its limited shooting schedule and the studio's decision to "put everybody in it they could get for six bits." Cagney was particularly irritated by the fact that he pressed them to cast his old friend Frank McHugh in the small role of Tommy in order to bring a touch of humor and lightness to the otherwise heavy piece. According to the star, Warners repeatedly agreed to do it, putting Cagney off until the first day of shooting when he was told McHugh wasn't available. Cagney found out later McHugh had never even been asked.