In 1941, bugler and career soldier Private Robert E. Lee Prewitt transfers to a rifle company at Schofield Barracks on the island of Oahu. Captain Dana “Dynamite” Holmes has heard he is a talented middleweight boxer, and wants him to join his regimental team, hoping to secure a promotion for himself. Prewitt refuses, having stopped fighting because he blinded his sparring partner and close friend over a year before.
Holmes makes life as miserable as possible for Prewitt, hoping that he will change his mind, and then orders First Sergeant Milton Warden to prepare general court-martial papers, after Sergeant Galovitch first insults Prewitt and then gives an unreasonable order that Prewitt refuses to obey. Warden suggests, however, that he try to get Prewitt to change his mind by doubling up on company punishment. The other non-commissioned officers join in the hazing, and Prewitt is supported only by his close friend, Private Angelo Maggio.
Meanwhile, Warden, at the risk of a prison sentence, begins an affair with Holmes’ neglected wife, Karen. Sergeant Maylon Stark has told Warden about Karen’s many previous affairs at Fort Bliss, including with himself. As their relationship develops, Warden asks Karen about her affairs to test her sincerity, and Karen relates that Holmes has been unfaithful to her most of their marriage. She miscarried one night after Holmes returned home from one of his dalliances, drunk and unable to call a doctor, rendering her barren. She then affirms her love for Warden, and encourages him to become an officer so she can divorce Holmes and marry him. Warden reluctantly agrees to consider it.
Prewitt and Maggio spend their liberty at the New Congress Club, a gentlemen’s club where Prewitt falls for Lorene. She wants to marry a “proper” man with a “proper” job, and live a “proper” life. Maggio and Staff Sergeant James R. Judson nearly come to blows at the club over Judson’s loud piano playing. Later, Judson provokes Maggio by taking his photograph of his sister from him, kissing it, and whispering in Prewitt’s ear. Maggio smashes a barstool over Judson’s head. Judson pulls a switchblade, but then, Warden intervenes. Judson backs down, but warns Maggio that sooner or later, he will end up in the stockade, where Judson is in charge.
During a weekend liberty, while Prewitt is with Lorene at the New Congress Club, Maggio walks in drunk and in uniform having deserted his post. The military police arrest Maggio, and he is sentenced to six months in the stockade.
Sergeant Galovitch later picks a fight with Prewitt while he is on detail, and a crowd gathers as the two start fighting. At first, Prewitt resorts only to body blows, and even then pulling his punches, but his fighting spirit reemerges and he comes close to knocking Galovitch out before Holmes, who had been watching for some time from outside the crowd, finally steps in and stops the fight. Galovitch accuses Prewitt of starting the fight, but when the man in charge of the detail says that it was Galovitch, Holmes abruptly lets him off the hook and disperses the crowd.
The entire incident is witnessed by the base commander, who orders an investigation by the Inspector General. When the truth about Holmes is revealed to the commander he orders a court martial, but when Holmes begs for an alternative, an aide suggests that Holmes resign his commission; the commander accepts the suggestion and orders Holmes’ resignation within the hour. Holmes’ replacement, Captain Ross, reprimands the others involved in the hazing and orders the boxing team’s framed photographs and trophies be destroyed; he then demotes Galovitch to private and puts him in charge of the latrine.
Maggio escapes from the stockade and, after telling of the abuse he suffered at Judson’s hands, dies in Prewitt’s arms. After tearfully playing Taps in tribute to his friend, Prewitt hunts Judson down and kills him with the same switchblade Judson pulled on Maggio earlier, but in so doing sustains a serious stomach wound, and so he goes into hiding at Lorene’s house.
The military is caught completely by surprise on Sunday morning when the Japanese commence a pre-dawn attack on Pearl Harbor. Against Lorene’s wishes, Prewitt attempts to rejoin his company under cover of darkness, but is shot dead by a patrol guarding against possible saboteurs. Warden sadly notes the irony of the boxing tournament being canceled because of the attack.
When Karen finds out that Warden never applied for officer training, she realizes they have no future together, and regretfully sails back to the mainland with her husband. On board the ship, Lorene and Karen meet, and Lorene says that her fiancé, named Robert E. Lee Prewitt, was a bomber pilot who was heroically killed during the attack. Karen recognizes Prewitt’s name, but says nothing.