The original play was inspired by an actual Code Red at Guantanamo Bay. Lance Corporal David Cox and nine other enlisted men tied up a fellow Marine and severely beat him for snitching to the Naval Criminal Investigative Service. Cox was acquitted and later honorably discharged. In 1994, David Cox mysteriously vanished, and his bullet-riddled body was found three months later. His murder remains unsolved.
Tri-Star Pictures produced the film with Aaron Sorkin writing the screenplay adaptation of his play. Tri-Star executives instructed Sorkin to make several changes to the story including a sex scene between Kaffe and Galloway. As this was Sorkin's first screenplay he did write it in although he had strong reservations about doing so since this does not occur in his play version. In Sorkin's words: "Nobody at Tri-Star was talking about a romance, by the way, we were just talking about these two people going to bed". When Rob Reiner came aboard to direct he used his clout against the studio and told the young Aaron Sorkin to toss the screenplay and start over. Reiner, who had seen the play and loved it, felt adding in a sexual encounter added nothing to the story and was just a cheap Hollywood thrill tactic.
Tom Cruise's Jack Nicholson impersonation (when his character is quoting Colonel Jessep) was not scripted. Demi Moore's and Kevin Pollak's reactions are genuine.
Writer Aaron Sorkin got the story idea from his sister, who in real life experienced a very similar incident at Guantanamo from the "Lieutenant Commander Galloway" perspective as a female JAG attorney. In that incident, the victim was similarly assaulted by nine Marines and was badly injured, but did not die. Sorkin initially turned the idea into a play, and then this screenplay, which was his first.
An unnamed executive gave Aaron Sorkin a note: "If Tom Cruise and Demi Moore aren't going to sleep with each other, why is Demi Moore a woman?" He responded, "I said the obvious answer: Women have purposes other than to sleep with Tom Cruise." He claimed the incident was his worst experience as a screenwriter.
Charles Erwin: The marching band in the beginning is The Capital Band, and has a brief mention in the closing credits. The man in black is former Assistant Conductor and solo cornet for the President's Marine band.