The black-and-white film was shot in Spain. Bernard Gordon's screenplay of Jones's work concentrates on the relationship between the young rule-breaking, "survival-at-any-cost", Pvt. Doll (Keir Dullea) and the older veteran 1st Sgt. Welsh (Jack Warden).
As an American infantry battalion aboard a troopship prepares to land on Guadalcanal, Charlie Company's First Sergeant Welsh tells Private Doll he had not provided him with reports that Doll insisted that he gave to Welsh. They are overheard by their company commander Captain Stone. The Captain speaks with Welsh privately and tells him that he witnessed Doll hand Welsh the reports. Welsh replies that he knew he did but that war is insanity and the only way the men can survive the upcoming battle is to live with that fact. The Captain informs Welsh he is not pleased with his attitude. Welsh and Doll continue to be at odds with each other over Doll's independent thinking that extends to his stealing a pistol from another soldier that he thinks will give him an edge in surviving.
Once ashore, Charlie Company engages the Japanese with Doll killing a Japanese soldier with his stolen pistol, increasing Welsh's animosity towards him. During the campaign Doll shows his independent thinking by leading a successful attack against enemy emplacements when Stack, his platoon sergeant, panics and proves incapable of leadership. As Doll gains combat experience, his relationship with Welsh grows more strained.
Charlie Company is assigned to capture a strategic hill called "The Dancing Elephant" that the two other rifle companies of the battalion have failed to capture. The approach through a minefield called "The Bowling Alley" leads Captain Stone to initially refuse to order his men into a killing field controlled by enemy fire. Doll and Welsh climb the surrounding hills sending boulders into the Bowling Alley that set off the land mines. Though Charlie Company's attack is a success, Captain Stone is relieved of his command by his battalion commander Lt. Colonel Tall for being too close to his men. Charlie Company next captures a village held by the enemy who appear to retreat but counterattack during the night.
The survivors, including Doll and Welsh, attack The Dancing Elephant.