Edward Woods was originally hired for the lead role of Tom Powers and James Cagney was hired to play Matt Doyle, his friend. However, once director William A. Wellman got to know both of them and saw Cagney in rehearsals, he realized that Cagney would be far more effective in the star role than Woods, so he switched them.
Because of the famous grapefruit scene, for years afterward when dining in restaurants, fellow patrons would send grapefruit to James Cagney, which--almost invariably--Cagney would happily eat.
Several versions exist of the origin of the notorious grapefruit scene, but the most plausible is the one on which both James Cagney and Mae Clarke agree: The scene, they explained, was actually staged as a practical joke at the expense of the film crew, just to see their stunned reactions. There was never any intention of ever using the shot in the completed film. Director William A. Wellman, however, eventually decided to keep the shot, and use it in the film's final release print.
The machine gun attack on Tom Powers and his best friend Matt Doyle actually used real machine gun bullets. An expert with the gun stood on a raised platform 15 to 20 feet away from the target, and when James Cagney's face disappeared behind the corner of the wall, he opened fire and created that tight circle of machine gun bullets.
The scene where Tom shoots the horse that threw and killed Sam "Nails" Nathan in a riding accident was based on an actual incident. In 1924 Sam "Nails" Morton, a member of Charles Dion O'Bannion's gang, was thrown from his horse and killed while riding in Chicago's Lincoln Park. Other members of the gang, led by Louis "Two Gun" Alteri, kidnapped the horse, took it to the spot where the accident occurred and shot it dead. Source: Carl Sifakis, "Encyclopedia Of American Crime."
According to James Cagney's autobiography, Mae Clarke's ex-husband, Lew Brice, enjoyed the "grapefruit scene" so much that he went to the movie theater every day just to watch that scene only and leave.
Further connection to the Charles Dion O'Bannion reference is that the rival gang in the film are led by "Schemer Burns", an obvious reference to the real-life "Schemer Drucci", who was part of the North Side Gang led by O'Bannion.
At about half an hour into the film, there is a sign indicating a showing of the Duke Ellington film, Black and Tan. Since "The Public Enemy" has much to do with Prohibition, this is a clever pun by the filmmakers, as a black and tan is also a common mixed drink (typically stout and ale, hence its name).