The Battle of Endor was a decisive battle of the Galactic Civil War, one in which the Alliance to Restore the Republic shattered the rule of the Galactic Empire and saw the destruction of the Death Star II and the deaths of Darth Sidious and Darth Vader. The triumph of the Alliance over the Empire, and the void left in the wake of the Emperor's demise, gave the Alliance the opportunity to give rise to the New Republic.
The Death Star II was discovered after Roses 11, 12, and 13 of Rose Squadron were sent to investigate Endor for a possible new base of operations for the Alliance but instead had stumbled to discover the Empire's secret weapon, finding it to be a lot more bigger than the first one. The three pilots were spotted by imperial orbital radar scanners and were attacked by a wing of TIE fighters and one Tartan-class patrol cruiser. The three X-wings were able to escape and hyperspaced back to Haven and informed the Alliance High Command of their shocking discovery.
Afterwards High Command started to mobilize forces of the Alliance Military, both Army and Fleet, to take part in the upcoming, and large, battle of Endor.
After a large Alliance fleet, organized by Ackbar with help of High Command, reached the orbit of Sullust where they would launch their attack on the Death Star II from but when they discovered a shield generator that was being powered to protect the massive space station, they had sent General Han Solo, along with Commanders Leia Organa and Luke Skywalker, and Chewbacca, to go ahead and land on the forest moon to disable the shield in order for the Alliance to attack.
Taking off from the Home One, Solo's task force had successfully passed by the imperial fleet, which comprised of over a hundred star destroyers of different types as well as other Imperial Navy starships with possibly thousands of TIE series fighters, and landed on the surface to only be captured by Ewoks hours later.