During the United States' involvement in the Vietnam War, a group of boot camp recruits arrive at Parris Island. The ruthless drill instructor, Hartman, employs forceful methods to turn the recruits into combat-ready Marines. Among the recruits are the overweight and dim-witted Leonard Lawrence, whom Hartman nicknames "Gomer Pyle", as well as the wisecracking J.T. Davis, who receives the name "Joker" after interrupting Hartman's speech with an impression of John Wayne.
Private Pyle is initially inept at basic training and is the focus of Hartman's brutality, but he slowly improves after being paired with Joker. However, when Hartman discovers a contraband doughnut in Pyle's unlocked foot locker, he adopts a collective punishment policy: he will punish the entire platoon minus Pyle for every mistake he makes. One night, the recruits haze Pyle with a blanket party; Joker reluctantly participates. Following this incident, Pyle reinvents himself as a model recruit and shows particular expertise in marksmanship. This impresses Hartman, but worries Joker, who notices Pyle talking to his rifle and believes that he may be suffering a mental breakdown.
The recruits graduate and receive their Military Occupational Specialty assignments. Joker is assigned to Military Journalism, while most of the others including Pyle are assigned to Infantry. During the platoon's final night on Parris Island, Joker discovers Pyle in the head suffering from a mental breakdown while loading his rifle. Pyle executes drill commands and loudly recites the Rifleman's Creed, waking the others, including Hartman, who storms into the latrine, insults Pyle and orders him to surrender the rifle. Pyle shoots Hartman dead and then kills himself by shooting himself in the mouth, while Joker watches in horror.
In January 1968, Joker now a sergeant is a war correspondent in Da Nang, South Vietnam for Stars and Stripes with Private First Class Rafterman, a combat photographer. Rafterman wants to go into combat, as Joker claims he has. At the Marine base, Joker is mocked for his lack of the thousand-yard stare, indicating his lack of war experience. They are interrupted by the start of the Tet Offensive as the North Vietnamese Army unsuccessfully attempts to overrun the base.
The following day, the journalism staff is briefed about enemy attacks throughout South Vietnam. Joker is sent to Phu Bai, accompanied by Rafterman. They meet the Lusthog Squad, where Joker is reunited with Cowboy. Joker accompanies the squad during the Battle of Huế, where platoon commander "Touchdown" is killed by the enemy. After the Marines declare the area secure, a team of American news journalists and reporters enters Huế to interview various Marines about their experiences in Vietnam and their opinions about the war.
While patrolling Huế, Crazy Earl, the squad leader, is killed by a booby trap, leaving Cowboy in command. The squad becomes lost, and Cowboy orders Eightball to scout the area. A Viet Cong sniper wounds Eightball and Doc Jay, the squad medic. Believing that the sniper is drawing the squad into an ambush, Cowboy attempts to radio in tank support to no avail. The squad's machine gunner, Animal Mother, disobeys Cowboy's orders to retreat and attempts to save his comrades. He discovers there is only one sniper, but Doc Jay and Eightball are killed when Doc Jay attempts to indicate the sniper's location. While maneuvering toward the sniper, Cowboy is shot and killed.
Animal Mother assumes command of the squad and leads an attack on the sniper. Joker discovers the sniper, a teenage girl, and attempts to shoot her, but his rifle jams and alerts her to his presence. Rafterman shoots the sniper, mortally wounding her. As the squad converges, the sniper first prays and then begs for death, prompting an argument about whether to kill her or leave her to suffer. Animal Mother decides to allow a mercy killing only if Joker performs it. After some hesitation, Joker shoots her. The Marines congratulate him on his kill as Joker stares into the distance. The Marines march toward their camp, singing the "Mickey Mouse March". Joker states in narration that despite being "in a world of shit", he is glad to be alive and is no longer afraid.