John Rambo (Sylvester Stallone) is a former member of an elite United States Army Special Forces unit and was awarded the Medal of Honor for his service in the Vietnam War in which he was a POW. The film begins 10 years after the war, in the American Northwest in December 1982. Rambo is searching for one of his friends from his unit, Delmare Berry, by traveling to his farm. Rambo soon learns from Delmare's mother that he has died a few months earlier from cancer due to Agent Orange exposure. Although not yet revealed to the audience, Rambo knows he is now the last surviving member of his unit. He leaves the picture of his unit with Berry's mother and walks away, obviously saddened.
The scene fades to Rambo entering the small town of Hope, Washington State (actually Hope, British Columbia) on foot. With his long hair and military-style coat, he is quickly spotted by the town's overzealous and paranoid sheriff, Will Teasle (Brian Dennehy) who quickly drives Rambo out of town, noting his strong distaste for "drifters." A defiant Rambo heads back toward town immediately, to the dismay of Teasle who arrests him for vagrancy and for carrying a large combat knife as a concealed weapon.
Rambo stands his ground against the officers at the station and is brutalized and harassed by Art Galt (Jack Starrett), the sheriff's cruel head deputy and closest friend. When Galt and two other officers (Chris Mulkey and David Caruso) first spray him with a fire hose, noticing a series of scars on his body. When they attempt to dry-shave him with a straight razor in preparation for his court appearance, Rambo has a flashback to being tortured in a North Vietnamese P.O.W. Camp and loses control, instinctively using his military training to beat Galt and his comrades. He fights his way out of the station, retrieves his large knife. He assaults most of the officers, throws a civilian off a motorcycle, steals it, and is pursued into the nearby mountains. Teasle chases him into the wilderness but cuts off the pursuit when his car overturns.
The deputies are eventually forced to search for Rambo on foot and he climbs down onto a steep cliff to elude capture. After spotting Rambo from a helicopter, Galt blatantly disregards procedure and attempts to shoot him in cold blood. Rambo drops off the cliff into a mass of trees and cornered, throws a rock at the helicopter in self-defense. The helicopter, struck by the projectile rock thrown by Rambo, pitches, causing Galt to fall to his death. Teasle, who did not see Galt's attempt to kill Rambo, vows to avenge his friend's death. When Rambo attempts to surrender, he's shot at by Teasle's men and retreats into the woods.
Teasle leads his deputies into the forest to capture or kill Rambo. The deputies are inexperienced and bicker, particularly after learning over the radio about Rambo's combat experience as a Green Beret and status as a war hero. Rambo quickly disables the small, disorganized team using guerrilla tactics and booby traps, severely wounding, but not killing, all the deputies. In the chaos, Rambo, wearing heavy natural camouflage, isolates and confronts Teasle, holding his knife to the sheriff's throat and saying, "Don't push it or I'll give you a war you won't believe. Let it go." he warns before disappearing into the woods.
A base camp is assembled near the site and the National Guard is called in. United States Special Forces Colonel Sam Trautman (Richard Crenna) arrives, taking credit for training Rambo, telling the sheriff that Rambo has been trained to survive in harsh environments and has been taught to engage superior numbers in combat. He is surprised to find any of the deputies still alive and warns that it would be safer to let Rambo go and find him a few days after the situation has calmed down, suggesting that Rambo can be apprehended without a fight. Fueled by a mixture of scorn and pride, the hot-headed Teasle refuses to heed his advice. Knowing that Rambo had stolen a CB radio from one of his men, Teasle allows Trautman to talk to Rambo. Trautman tries to convince Rambo to give himself up, however, Rambo refuses, citing his deplorable treatment by Teasle and his men. Trautman suggests that Rambo shouldn't have fought back so harshly, to which Rambo states "They drew first blood, Sir." Rambo switches the radio off. By the time the conversation ends, Teasle's men have triangulated Rambo's location on the mountain.
Rambo is eventually cornered by the National Guard troopers in a mine entrance, where he has taken refuge. The novice guardsmen fire a M-72 LAW 66mm rocket at him, collapsing the entrance and trapping him inside. They assume Rambo is dead. Unbeknownst to his pursuers, Rambo has escaped into the tunnels of the mine. Rambo finds some old fuel and makes an improvised torch. After wading through waist-deep water and fighting off rats, Rambo cleverly uses the flame of the torch (as an indicator of air flow in the tunnels) to find an escape to the surface.
Rambo hijacks a passing U.S. Army M135 2.5 ton cargo truck, throws out the driver, and returns to town, crashing it into a gas station. He blocks the highway to anyone in pursuit by igniting the spilled fuel on the road, also destroying the stolen truck. Armed with an M-60 machine gun, Rambo then goes on a shooting spree in town as the residents flee. Rambo, using his experience at guerrilla tactics, takes out power transformers, blacking out part of the town. Rambo shoots up and destroys a sporting goods shop and a few other businesses in an attempt to confuse Teasle as well as identify his position before spotting him on the roof of the police station.
After shooting up the building, Rambo carefully enters the police station. Aware of Teasle's presence on the roof, Rambo darts under the skylight to draw fire as bait to reveal his exact location. Teasle immediately fires at Rambo who notes his position and returns fire through the ceiling with the M-60, injuring him. Teasle falls through the skylight onto the floor. Rambo steps over him, prepared to kill him. Before Rambo can shoot Teasle, Colonel Trautman appears and tells him that there is no hope of escaping alive. Rambo, now surrounded by the police, rages about the horrors of war in Vietnam and the difficulties he has faced adapting to civilian life. He's tired of being misunderstood, and how in the Army he was a war hero but back in America he could not even be trusted to work "parking cars." He weeps as he recounts a particularly gruesome story about witnessing his friend dying by having his legs blown off by a booby-trapped shoeshine box planted by a Viet Cong child operative. Rambo then turns himself in to Trautman and is arrested. The credits roll as he and Trautman exit the police station.