Leo Gordon had served five years for armed robbery at San Quentin State Prison. For this reason, Heinze, the Folsom warden, originally objected to Gordon appearing in the film, but director Don Siegel was able to convince him that Gordon was no threat to the prison.
Producer Walter Wanger served a four-month prison term for shooting agent Jennings Lang, whom he suspected of having an affair with his wife Joan Bennett. The experiences he had in prison so unnerved him that upon his release he resolved to make a film about what prison was "really" like, not the typical Hollywood prison film made by people who had never been anywhere near a prison or who had never had any experience with the justice system. He shot the film at California's Folsom State Prison and used both guards and inmates as extras and technical advisers. Wanger's cast and crew also differed from the Hollywood "norm"; among them were actor Neville Brand, decorated Army veteran of WW II who earned a Silver Star in the Allied European campaign; actor Leo Gordon, another combat veteran, who had served five years in San Quentin State Prison for armed robbery; and then-production assistant Sam Peckinpah, whose father, Denver Peckinpah, was a widely known and respected law-and-order judge in northern California (and whose name alone was enough to get the warden to allow the film to be shot in Folsom State Prison).
At the time this was produced (1953-54), the Production Code was in full force. The Code prohibited any direct references to homosexuality. That's why the dialog subtly refers to keeping young inmates away from "certain prisoners."
This film was based on an April 1952 riot at the State Prison in Jackson, Michigan in which the inmates held nine guards hostage for five days. Newsreel footage of that riot (and others) begins the film.
The characters of Dunn and Carnie were based on real-life convicts who spearheaded a prison riot in Jackson, Michigan in 1952. Moreover, the character of the warden was likewise patterned after the deputy warden of the prison in Jackson, Michigan.