U.S. Marines Lance Corporal Harold Dawson and Private First Class Louden Downey are facing a general court-martial, accused of murdering fellow Marine William Santiago at the Guantanamo Bay Naval Base in Cuba. Santiago had poor relations with his fellow Marines, compared unfavorably to them, and broke the chain of command in an attempt to get transferred out of Guantanamo. Base Commander Colonel Nathan Jessup (Jack Nicholson) and his officers argue about the best course of action: while Jessup’s executive officer, Lieutenant Colonel Matthew Markinson (J. T. Walsh), advocates that Santiago be transferred, Jessup dismisses the option and instead orders Santiago’s commanding officer, Lieutenant Jonathan James Kendrick (Kiefer Sutherland), to “train” Santiago to become a better Marine.
While it is believed that the motive in Santiago’s murder was retribution for naming Dawson in a fenceline shooting, Naval investigator and lawyer Lieutenant Commander JoAnne Galloway (Demi Moore) largely suspects Dawson and Downey carried out a “code red” order: a violent extrajudicial punishment. Galloway wants to defend the two, but the case is given to Lieutenant (Junior Grade) Daniel Kaffee (Tom Cruise) – an inexperienced and unenthusiastic lawyer with a penchant for plea bargains. Galloway and Kaffee instantly conflict, with Galloway unsettled by Kaffee’s apparent laziness whilst Kaffee resents Galloway’s interference. Dawson shows outright contempt for Kaffee, refusing to salute or acknowledge him as an officer. When Kaffee negotiates a plea bargain with the prosecutor, Dawson and Downey refuse to go along, insisting that Kendrick had indeed given them the “code red” order and that they never intended Santiago to die. Kaffee and Galloway travel to Guantanamo base Cuba to question Colonel Jessup and others. Under questioning, Jessup claims Santiago was set to be transferred. Lt. Col Markinson disappears. He later reveals himself to Kaffee and states, unequivocally, that Jessup never ordered a transfer for William Santiago.
Galloway convinces Kaffee to take the case to court. The defense manages to establish that Cpl Dawson had been denied promotion for smuggling food to a Marine who had been sentenced to a bread and water: clearly disobeying a direct order. However, the defense then suffer two major setbacks: Downey, under cross-examination, reveals he was not actually present when Dawson received the supposed “code red” order, and Markinson, after he tells Kaffee that Jessup never ordered the transfer, but, ashamed that he failed to protect a Marine under his command, commits suicide before he can testify.
Without Markinson’s testimony, Kaffee believes the case lost. He later returns home in a drunken stupor, lamenting that he fought the case instead of taking a deal. Galloway encourages Kaffee to call Jessup as a witness, despite the risk of being court-martialed for smearing a high-ranking officer. Jessup spars evenly with Kaffee’s questioning, but is unnerved when Kaffee points out a contradiction in his testimony: Jessup stated his Marines never disobey orders and that Santiago was to be transferred for his own safety; if, Kaffee asks, Jessup ordered his men to leave Santiago alone, then how could Santiago be in danger? Irate at being caught in a lie and disgusted by what he sees as Kaffee’s impudence towards the Marines, Jessup extols the military’s importance, and his own, to national security. When asked point-blank if he ordered the “code red”, Jessup continues with self-important rant until, after repeatedly being asked the question, he bellows with contempt that, in fact, he did order the “code red.” Jessup tries to leave the courtroom but is promptly arrested.
Dawson and Downey are cleared of the murder charge, but found guilty of “conduct unbecoming” and ordered to be dishonorably discharged. Dawson accepts the verdict, but Downey does not understand what they did wrong. Dawson explains that they had failed to defend those too weak to fight for themselves, like Santiago. As the two are leaving, Kaffee tells Dawson that he does not need to wear a patch on his arm to have honor. Dawson sheds his previous contempt for Kaffee, acknowledges him as an officer, and renders a salute. The film ends with Kaffee and Ross exchanging kudos before Ross departs to arrest Kendrick.