In 1941 Hawaii, Private Robert E. Lee Prewitt (Montgomery Clift) is transferred from the Bugle Corps at Fort Shafter (giving up his corporal stripes) to a rifle outfit, Company "G," at Schofield Barracks on the Hawaiian island of Oahu. When Captain Dana "Dynamite" Holmes (Philip Ober) learns of his reputation as a talented boxer, he recommends that Prewitt join the regimental boxing club that he heads, and promises that Prewitt will be promoted to corporal or even sergeant, if he helps win the boxing trophy on December 15. For reasons unknown to the regiment Prewitt adamantly refuses. Holmes retaliates by making army life as miserable as possible for Prewitt hoping he will agree to box.
Unable to break Prewitt, Holmes orders First Sergeant Milton Warden (Burt Lancaster) to prepare court martial papers. Warden, however, knowing of Holmes' unfair treatment and realizing Prewitt is a thirty-year soldier (career soldier), suggests that he try to entice Prewitt to change his mind by doubling up on company punishment. The other non-commissioned officers assist in the conspiracy with brutal hazing rituals. Prewitt is supported only by his friend, Private Angelo Maggio (Frank Sinatra).
Meanwhile, behind his commander's back, Warden begins an affair with Holmes' neglected wife Karen (Deborah Kerr). Sergeant Maylon Stark (George Reeves) has told Warden of Karen's many affairs with other soldiers at Fort Bliss, including his own. As their relationship develops, Warden asks Karen about her numerous affairs to test her sincerity with him. Karen relates that Holmes had been unfaithful to her most of their marriage. She lost a baby when Holmes came back from one affair drunk, and unable to assist her to the hospital. She then affirms her genuine love for Warden.
Prewitt and Maggio spend their liberty time at the New Congress Club, a gentleman's club in downtown Honululu where Prewitt meets, and falls for, Lorene (Donna Reed), a local dancer and call girl. Prewitt confides to Lorene the reason he refuses to box for the company is that he blinded a close friend while sparring. Maggio encounters Sergeant 'Fatso' Judson (Ernest Borgnine), a crass and racist sergeant at the club. When Maggio complains that Judson's piano playing is interfering with his dancing, the two nearly come to blows. Maggio is told that Judson is the Sergeant of the Guard at the stockade.
Later, at a tavern called "Choy's," located near the base, Judson sees Maggio holding a photograph of his family. Judson makes an inappropriate comment to Prewitt about Maggio's sister causing Maggio to smash a bar stool on Judson's head. Judson pulls a switchblade on Maggio, but Warden, sitting in a corner, intervenes to save Maggio by telling Judson that killing Maggio would "create two weeks of paperwork" for him. When the brutal Judson advances on Warden with the knife, Warden breaks a beer bottle in two and uses the jagged edge as a weapon. Judson retreats, throws down his knife and goes to the bar for a drink. However, he warns Maggio that sooner or later Maggio would end up in the stockade and he would be there waiting for him.
A few days later, Karen tells Warden that if he became an officer, she could divorce Holmes and they could return to the States and marry. Warden is not keen on the idea because of his dislike of officers, but agrees to consider the matter.
Prewitt manages a weekend pass, courtesy of Warden, and goes to meet Lorene who is too busy at the club to talk. However, she meets him later at a bar for a drink. He tells Lorene he loves the Army, and shows Lorene his prized possession, a bugle mouthpiece. He tells her, "I played taps last Armistice Day at Arlington National Cemetery. The President was there." Maggio then walks in drunk and in uniform, explaining that he was assigned to for guard duty that night, but deserted his post. Lorene encourages Prewitt to take Maggio back to the base. While Prewitt is calling for a taxi, Military Police arrive and arrest Maggio, and he is sentenced to six months in the stockade for desertion.
Matters come to a head for Prewitt when Sergeant Galovitch picks a fight with Prewitt while on yard detail, and the two come to blows. At first, Galovitch repeatedly pummels Prewitt, who initially refuses to fight back, and then resorts to using only body blows. But as Galovitch and others watching continue taunting him, he begins boxing, hitting Galovitch in the face and nearly managing to knock him out before Holmes finally steps in and stops the fight. When Galovitch falsely accuses Prewitt of insubordination, Holmes is about to punish Prewitt again until the man in charge of the detail says that it was Galovitch, not Prewitt, who was spoiling for the fight. Instead of punishing 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 Holmes' true intentions are revealed, the general orders a court-martial. When Holmes begs for an alternative, the commanding officer's aide suggests that Holmes resign his commission "for the good of the service" and leaves the Army, which the general accepts with dispatch. Holmes' replacement, Captain Ross, orders that Sergeant Galovitch be demoted to private and put in charge of the latrine.
One evening, a few weeks later, Maggio manages to escape from the stockade and find Prewitt. He tells of the abuse he endured by Judson, then dies in Prewitt's arms. The next morning, Prewitt plays taps as tears stream down his cheeks. Seeking revenge, Prewitt tracks down Judson in town and invites him into a back alley to talk, then attacks him. The two fight with switchblades, Prewitt using the very same switchblade Judson had pulled on Maggio earlier. Prewitt kills Judson, but not before sustaining a serious stomach wound. Prewitt goes into hiding at Lorene's apartment. Despite Prewitt's AWOL status, his platoon sergeant carries him "present" for three days at Warden's direction. Lorene, whose real name is Alma, tends to Prewitt's wounds.
On December 7, 1941, the Japanese attack Pearl Harbor. Enemy planes also attack nearby Wheeler Air Base as well as the barracks. Warden leads several of his men in battle by climbing to the roofs of the barracks and returns fire against strafing Japanese fighter planes, shooting down at least one of them.
That evening, Prewitt, still weak from his unhealed wound, finds out about the attack over the radio, and attempts to return to camp under cover of darkness, despite protests from Lorene to wait until daylight. During the walk back to the barracks, Prewitt is spotted by several jittery sentries on the lookout for saboteurs. Instead of stopping and identifying himself to the sentries, Prewitt attempts to run and gets shot dead while running across a golf course, his body landing in a nearby sand trap. Warden arrives on the scene a few minutes later with military investigators and identifies the body. Warden laments Prewitt's stubbornness and states the irony that because of the attack, the December 15, 1941 boxing tournament has been canceled.
Holmes' resignation results in Karen having to return to the States with him. When she finds out that Warden failed to apply for officer status, she realizes they will never be together.
In the final scene, Lorene and Karen meet for the first (and only) time on a ship leaving for the mainland. Karen then tosses two leis into the water. She tells Lorene, "If the leis go to shore, a person will return to Hawaii. If the leis float out to sea, a person will never return." Lorene says she will never return to Hawaii, telling Karen that her fiance was an Army Air Corps pilot who was killed in a B-17 plane during the December 7th attack. Lorene quotes: "he was awarded the Silver Star, they sent it to his mother. She wrote me. She wanted me to have it. They are very fine people, Southern people. He was named after a general. Robert E. Lee Prewitt." Karen recognizes Prewitt's name from conversations with Warden and is aware that Lorene is lying about Prewitt's death, but she says nothing. The final shot shows Lorene holding Prewitt's treasured bugle mouth piece.