The script was completed in 1970 but contained too much profanity to be shot as written. Columbia Pictures waited for two years trying to get writer Robert Towne to tone down the language. Instead, by 1972, the standards for foul language relaxed so much that all the profanity was left in.
Jack Nicholson turned down the role of Johnny Hooker (Robert Redford was later cast) in The Sting (1973), which he thought was too commercial, to appear in this film, which was written by his good friend Robert Towne. Nicholson and Redford were nominated as Best Actor of 1973 at the Academy Awards®, losing out to Jack Lemmon in Save the Tiger (1973).
The first of three films in three successive years for which Jack Nicholson was nominated for an Academy Award® for Best Actor. This film was followed by Chinatown (1974) and One Flew Over the Cuckoo's Nest (1975); he eventually won the award for the last of these.
Screenwriter Robert Towne stated that the main reason the film had so much profanity was his view that "This is how people talk when they're powerless, they bitch," since Buddusky and Mulhall don't agree with Meadows' jail sentence, but have no legal ways to help him (and aren't going to let him escape and bring wrath upon themselves). Towne also tied the film into the then-ongoing Vietnam War, saying that "everyone hides behind a title in the military, whether you're killing at My Lai, or taking a kid to jail."
In 1974, the year the film was released, the Department of Defense permanently closed down the naval brig in Portsmouth, NH. All naval prisoners subsequently were sent to Fort Leavenworth Military Prison in Kansas.