What happened in Metal Gear Solid 3 and 4
That's not an easy question to answer.
In MGS3, a young Big Boss, before he is awarded the title, is sent on a mission to rescue a Soviet Scientist during the Cold War. The mission goes sour when The Boss, his mentor and the best soldier in the U.S. Army, defects to the Soviet Union and gives a rogue Soviet Colonel a pair of miniature nukes.
The Colonel kidnaps the scientist so he can build a tank called the Shagohod, an early type of Metal Gear. The Colonel, Volgin, then uses one of the nukes to destroy the scientist's research lab as they escape. Because the nuke is American made, and because The Boss was involved, the Soviet Union holds the US responsible. In order to prevent all-out war, the US offers to assassinate both The Boss and Volgin, while also working to recapture the scientist.
Under the codename Naked Snake, the soon-to-be Big Boss is sent in to complete the mission, under threat of death.
After meeting a number of characters and slaying the majority of The Boss' team, Snake discovers that Volgin is in possession of the Philosopher's Legacy, a massive stockpile of money stored by the Philosophers, a group of officials from the US, USSR, and China during World War II.
Both the US and America want it, and, through the help of a Russian spy named EVA, Snake discovers that a microfilm of its whereabouts exist. This doesn't matter too much to Snake, who's mission is to prevent a nuclear war and kill his mentor/mother-figure.
He manages to kill both Volgin and the Shagohod, ending the threat of nuclear war. However, he has to face against The Boss in order to complete his mission, as she taught him that the mission was more important than anything.
The Boss uses the last nuke to destroy Volgin's base, and the two square off in a field of white flowers. She tells Snake that only one of them will survive and that the winner will go one to live a life of fighting. She also shares her dream of a world that isn't reliant on ideology or politics, and that can live in peace.
Snake kills her and escapes with EVA.
After spending a night together, EVA leaves Snake a recording that explains that his mission was a farce. The Boss didn't really defect, she was only supposed to infiltrate Volgin's base to find the Legacy for America. Volgin's use of the nuke wasn't expected and so the US had to hastily solve it by killing The Boss. EVA was really a Chinese spy and has made off with the microfilm that reveals the Legacy's location.
Snake is awarded the title of Big Boss for his actions and becomes disillusioned with the course his life has taken.
A young Revolver Ocelot, who was a US spy all along, reveals that the Chinese actually have a fake copy of the microfilm, and that the US already has half of it. He also reveals that he has the plans to Metal Gear and has acquired them for the US government at the behest of the Director of the CIA.
MGS4 begins quite a few years after MGS2.
Snake has aged rapidly for unknown reasons. He's contacted by Colonel Campbell and asked to assassinate Liquid, who has become the owner of several of the biggest Private Military Companies in the world. In the space between MGS2 and 4, war has become a major facet of the global economy, and mercenaries fight wars everywhere.
In order to keep wars and soldiers in check, a system of monitoring has been instituted, called Sons of the Patriots. It keeps a soldier from feeling emotions and also prevents their weapons from being used by anyone but the owners. In that way, wars are made into pure businesses.
However, Liquid is working on a way to take control of the system. It backfires in the Middle East and basically causes one of his PMC armies to lose full control, and Snake finds that he is affected too.
Snake and Otacon travel to South America to rescue Naomi Hunter, who is working with Liquid. There, she tells Snake that he has a mutated form of FOXDIE and that, while his aging only gives him a few more months live, the mutated virus will be able to infect everyone on the planet in half that time, so long as he is alive.
Liquid once more tries to subvert the System, but has marginally better results. Snake rescues Naomi, and she reveals that Liquid has the capability to shut down the Patriots, allowing him to take over the world. Naomi and Sunny, Olga's daughter, begin work on a computer virus to stop this from happening.
Snake makes contact with a resistance front in Easter Europe in order to meet their leader, who has Big Boss' remains. The leader turns out to be an elderly EVA, the woman who was Snake's surrogate mom, a member of the original Patriots, and Big Boss' lover, however briefly.
She explains, in one of the longest cutscenes of all time, the origins of the Patriots and why Big Boss betrayed his country. Major Zero, Big Boss' commander in MGS3, also became disillusioned at The Boss' death. He resolved to acquire the Philosopher's Legacy with Ocelot's help, have Big Boss destroy the US's early Metal Gear thus making him a hero again, and create the Patriots to transform the world into what the Boss had always wanted.
The original Patriots consisted of Zero, Big Boss, EVA, and the entire support staff from MGS3. Big Boss and Zero interpreted The Boss' will differently, and became enemies because of it. Big Boss left the Patriots and betrayed his country in order to stop them.
EVA reveals the remains of Big Boss who is basically a sack of jelly on life support, and the base is attacked by PMCs. After a chase sequence, EVA is injured and Liquid attempts to burn Big Boss' body, killing EVA in the process.
Liquid activates his Guns of the Patriots, thus disabling every military on Earth.
Naomi returns to Liquid's cause. Snake and Ocelot determine that Liquid is going to steal Metal Gear REX's rail gun to launch a nuke at the satellite that houses the Patriots' AIs. Snake travels back to Shadow Moses to stop them.
They arrive too late however, and Liquid makes off with the rail gun. And Naomi dies. The USS Missouri, the only functioning ship in the US Navy, trails him and his floating fortress "Outer Haven".
Snake, Meryl, and Johnny infiltrate Outer Haven but are split up. Snake has to fight his way past platoons of Liquid's personal soldiers and stumble through a hallway of microwave emitters, doing untold harm to himself in the process. They activate the virus to prevent Liquid from taking control of Patriots from the inside.
A recording by Naomi reveals that the virus, named FOXALIVE, prevents Liquid from gaining control, but still shuts down the Patriots and completely destroys everything that keeps civilization functioning.
On the highest point of Outer Haven, Liquid reveals that this had been his plan all along, and that he wanted to free the world from the Patriot's control. Revolver Ocelot had allowed Liquid to take control in order to beat the Patriots. He and Snake then battle and Snake kills him.
It's revealed that Sunny had rewritten the virus to keep intact the parts of the Patriots that hold society together, while editing out the controlling aspects.
Maryl marries Johnny, Otacon can begin living a normal life and Snake seemingly commits suicide in front of Big Boss' grave.
However, Snake is unable to kill himself. Big Boss shows up, alive and well. He reveals the hidden points behind the plot such as Revolver Ocelot using nanomachines and hypnotherapy to adopt Liquid's persona. He reveals that the corpse that Liquid burned was really that of Solidus Snake. EVA, Ocelot, and he were working together to stop the Patriots the entire time. Big Boss reveals why he left the Patriots and the he and a near-catatonic Major Zero are the last ones left.
He kills Major Zero and tells Snake that the FOXDIE in his body won't become active and that he his free to live the rest of his life as he chooses. Big Boss sits at The Boss' grave, smoking a last cigar. He greets Snake as a Father for the first, and last time. He dies there.
Later, Otacon tells Snake that he and Sunny are joining him in Snake's last few months alive and that they will carry on his legacy. Snake quits smoking.