The film opens with Colonel Samuel Trautman (Richard Crenna) returning to Thailand to once again enlist Rambo’s help. After witnessing Rambo’s victory in a stick fighting match, Trautman visits the temple Rambo is helping to build and asks Rambo to join him on a mission to Afghanistan. This brings Rambo more into the realm of the CIA’s famed Special Activities Division which primarily hires Army Special Forces soldiers. The mission is meant to supply weapons, including FIM-92 Stinger missiles, to Afghan freedom fighters, the Mujahideen, who are fighting the Soviets. Despite having been shown photos of civilians suffering under the Soviet rule, Rambo refuses and Trautman chooses to go on his own.
While in Afghanistan, Trautman’s troops are ambushed by Soviet troops while passing through the mountains at night. Trautman is imprisoned in a Soviet base and tortured for information by commanding officer Zaysen (Marc de Jonge) and his henchman Kourov (Randy Raney). Rambo learns of the incident from embassy field officer Robert Griggs (Kurtwood Smith) and immediately flies to Pakistan where he meets up with Mousa (Sasson Gabai), a weapons supplier who agrees to take him to a village deep in the Afghan desert, close to the Soviet base where Trautman is kept. The Mujahideen in the village are already hesitant to help Rambo in the first place, but are convinced not to help him when their village is attacked by Soviet helicopters after one of Mousa’s shop assistants informed the Russians of Rambo’s presence. Aided only by Mousa and a young boy named Hamid (Doudi Shoua), Rambo makes his way to the Soviet base and starts his attempts to free Trautman. The first attempt is unsuccessful and results in Hamid getting shot in the leg, and Rambo himself getting hit by wooden shrapnel. After escaping from the base, Rambo tends to Hamid’s wounds and sends him and Mousa away to safety.
The next day, Rambo returns to the base once again, just in time to rescue Trautman from being tortured with a flamethrower. After rescuing several other prisoners, Rambo steals a helicopter and escapes from the base. The helicopter crashes and Rambo and Trautman are forced to continue on foot. After a confrontation in a cave, where Rambo and Trautman kill several Russian soldiers including Kourov, they are confronted by an entire army of Russian tanks, headed by Zaysen. Just as they are about to be overwhelmed by the might of the Soviet Army, the Mujahideen warriors, together with Mousa and Hamid, ride onto the battlefield in a cavalry charge, overwhelming the Russians despite their numerical and technological superiority. In the ensuing battle, in which both Trautman and Rambo are wounded, Rambo manages to kill Zaysen by driving a tank into the helicopter in which Zaysen is flying.
At the end of the battle Rambo and Trautman say goodbye to their Mujahideen friends, and leave Afghanistan to go home.