Four years after the events of the San Hieronymo incident, Big Boss—who prefers his original title, Snake—and Kaz Miller have established Militaires Sans Frontières, a small mercenary faction, on the Colombian coast. They are approached by Ramon Galvez Mena, a professor at the University of Peace, and his student, Paz Ortega Andrade. Galvez attempts to hire MSF to investigate an army that has discreetly occupied parts of Costa Rica. Snake refuses, identifying Galvez as a KGB agent, but is convinced when Paz plays a recording of The Boss.
When Snake arrives in Costa Rica, he begins to suspect that the mystery army has brought nuclear weapons with them. Enlisting the help of the Sandinista Liberation Army, he tracks a shipment to a research facility deep in the mountains. His suspicions are confirmed when he witnesses Hot Coldman, a senior CIA agent, announce his intentions to fire a live nuclear weapon as part of a project code-named "Peace Walker," a fail-deadly nuclear tank. Snake reveals himself to Huey Emmerich, one of Peace Walker's designers, who agrees to help him stop Coldman.
Following Huey's instructions, Snake ventures deeper into Costa Rica, searching for Dr. Strangelove, the designer of Peace Walker's artificial intelligence systems. He discovers that Strangelove has based Peace Walker's primary control systems on The Boss' personality. She demands to know whether The Boss genuinely defected to the Soviet Union, or if she died on a mission that was covered up, going so far as to torture Snake for information.
Snake escapes custody and attempts in vain to destroy Peace Walker, a quadrupedal nuclear launch platform. He chases Peace Walker across the Nicaraguan border to an American airbase on the shores of Lake Cocibolca. Discovering that the base has been occupied by Soviet soldiers, Snake infiltrates the facility to confront Coldman. Coldman reveals the purpose of Peace Walker: he believes that nuclear deterrence is a flawed theory, relying on humans to retaliate in the event of a nuclear exchange, whom he believes to be unwilling to destroy their own race. As an impartial artificial intelligence, Peace Walker would guarantee retaliation, and Coldman intends to fire a warhead to prove it. Suddenly, the facility is overrun by Soviet soldiers, led by Galvez, who reveals himself as Vladimir Zadornov. Zadornov intends to hijack Peace Walker for the Soviet Union, but the standoff is broken by the arrival of MSF and the Sandinistas, giving Snake enough time to destroy Peace Walker.
In the aftermath of the battle, Zadornov is captured and Coldman mortally wounded. In his dying moments, Coldman activates Peace Walker's data uplink, convincing NORAD that the United States is about to be hit by a Soviet nuclear strike. Snake contacts NORAD, and tries to convince them to stand down, but senior members of the armed forces refuse and plan to retaliate. With a nuclear strike imminent, The Boss' personality takes control of Peace Walker's damaged artificial intelligence and drowns Peace Walker in Lake Cocibolca, severing the connection and ending the threat.
Some time later, Zadornov repeatedly escapes from MSF, arousing Snake's suspicions that someone has betrayed them. Paz reveals herself to be the traitor, using Zadornov's escapes to seize control of Metal Gear ZEKE, a walking tank designed by Huey to act as MSF's deterrent against foreign intervention. Acting as an agent of Major Zero—now using the name "Cipher"—Paz issues Snake an ultimatum: surrender MSF to Cipher and become his deterrent, or else she will fire a nuclear warhead on America, at which point they will be branded a nuclear-equipped extremist cult, and the world will unite in their pursuit of MSF. Snake prevents the launch by crippling ZEKE, and Paz is thrown into the ocean. In the aftermath, Snake reconciles with his memory of The Boss and accepts the title of Big Boss as he rallies the soldiers of MSF to prepare for a fight for their survival, declaring them to be living in "Outer Heaven".