The Unification Wars were a series of conflicts focused on Terra and the rest of the Sol System at the end of the Age of Strife, where the Emperor officially revealed himself to the general populace and began knocking heads to unite Terra and its home system. This is arguably one of if not the most pivotal series of events in the whole Warhammer 40,000 setting, as it marks the Emperor's rise to power, the creation of the Primarchs, the creation of the first Space Marines, and the founding of a united Imperium of Man.
Age of Strife
By M23, the human federation that had spread across the galaxy was on the brink of destruction after the war with the Men of Iron. It's infrastructure and economy ravaged by the war and the loss of it's entire specialized workforce. Already on it's last legs, Warp storms caused by the birth of Slaanesh separated systems from the larger federation. Cut off from the outside, falling into technological regression and vulnerable to xenos aggression, everything fell apart. This was the nail in the coffin for Terra, which was massively overpopulated and no longer had the resources of it's empire to rely on, as well as the depletion of it's own resources including fucking water.
What followed was about 5,000 years of anarchy, as Terra's once united world government quickly fragmented into dozens upon dozens of warring states. Think Mad Max and the Warring States period of China on an apocalyptic scale, where warlords and their warriors known as techno-barbarians warred against one another and subjugated and brutalized those under their domains. To add salt to the wound, chemical and nuclear wars turned the already overtaxed Terra into a barren, polluted wasteland.
The Emperor of Mankind
It's at this point where the Emperor decided to stop hiding in the shadows and get shit done for Mankind. Appearing as a brilliant strategist, warrior, scientist, leader, diplomat, (and all other professions you could give him)... he made himself known in the 29th century, out of nowhere, to challenge the rule of the technobarbarians and the warlords that ruled the remnants of Terra at this point. Possessing not only plenty of regular human followers that no doubt fought and kept his war industry going (remember, this is previously to the Emperor meeting with the cogheads at Mars) he also lead a massive army of Thunder Warriors. These mighty soldiers were the early prototype for Space Marines, being stronger and possibly bigger than them, but having very short and unstable lives as a drawback. With his armies, he slowly but steadily pushed back all other rivals, conquering them and adding them to their forces. He also had to deal with skirmishes with martian and lunar attacks, due to them also wanting to conquer Terra, and to steal some pieces of archeo-tech. His modus operandi was flexible enough to require both subtle diplomacy and propaganda to massive carnage and slaughter of his enemies. It is during this times that the Emperor shows his hatred and rejection for anything religious, utterly destroying the antartic civilization through nuclear warfare because they were a religious society, and also burning the last catheric church when it posed no threat to him. After years of warfare, he conquered the whole planet, while the thunderwarriors supposedly died during the last great battle, though probably it was Big E purging them before bringing the newer kids on the block to play. Many talk about the Unification Wars ending after the Battle of Mount Ararat, though really it should end after the Pacification of Luna. Whichever you choose, the result is the same, with the Emperor controlling Terra and gearing towards his Great Crusade to unite Mankind and to find his sons.