The Formic Wars were a series of conflicts between the human race and the Formics over the course of 100 years.[1] The wars began when the hive-minded Formics sent a colonization fleet to Earth,[2] not knowing that sentient life already existed on the planet. Not recognizing the humans as sentient beings, they attempted to terraform the world to their own needs.[1] The humans defended themselves, and managed to destroy the scout ship that was sent ahead of the main fleet.[2] However, the rest of the fleet eventually made it to the solar system, giving the humans another fight for their lives and their planet. Mazer Rackham destroyed the mothership housing the Hive Queen, ending the Second Invasion.
To prevent Earth from ever being attacked again, the humans sent an invasion fleet to the Formic Homeworld and other Formic colonies to destroy their alien adversaries. The invasion fleet was commanded by Ender Wiggin. Wiggin ended the Formic Wars when he used the Molecular Disruption Device on the Formic's homeworld, almost destroying the species in its entirety.[1]
First Invasion
The First Invasion (100 BX) began when the Formic colonization fleet launched a scout ship into the Solar System and began disrupting human communications due to their periodical gamma plasma exhaust bursts. These bursts later destroyed the mining ship El Cavador, Weigh Station 4,[3] most of the ships and structures in The Belt, and the asteroid city of Kleopatra.[4]

A wave of destruction caused by the Formics.
As the Formic ship dropped into orbit around Earth, the humans assumed the aliens had peaceful intent, and sent a United Nations ship to greet the Formics. The Formics launched a gamma plasma burst at the ship, subsequently destroying it and several other cam ships. Moments later, three massive spherical landers, each a kilometer across, separated from the Formic scout ship and streaked toward South China. Captain Mazer Rackham and his crew, deployed in China to train Chinese pilots to fly the experimental HERC aircraft, witnessed the impact of the landers and provided medical aid to injured villagers in the area. While doing so, the lander opened up to expel thousands of Formic fighters and troop carrying aircraft. The Chinese military managed to shoot down a few aircraft, while taking massive casualties in return. Mazer discovered that each troop carrier contained dozens of Formic soldiers. Each of these soldiers had a container containing a yellow chemical agent and a misting device. When sprayed, this chemical quickly killed surrounding plant life, essentially a defoliating agent used by the Formics to defoliate the land of Southern China.[4]
The Chinese then launched a failed offensive against the Formics inside their borders. Meanwhile, the United States launched a failed space attack against the Formic scout ship by scrounging together any ships that were capable of battle in their fleet. [4]

A photograph from the First Invasion, later used as propaganda by the International Fleet.

The effects of the Formics' terraforming gas on humans.
Out beyond the Kuiper Belt, the rest of the Formic colonization fleet reorganized itself, preparing for battle against the hostile lifeforms on the planet ahead.[2]
Second Invasion

The Formic ship containing a Hive Queen.
The Second Invasion (95 BX) began when the entirety of the Formic colonization fleet entered the interior of the Solar System and engaged in warfare with the humans. In a battle around the rings of Saturn, Mazer Rackham noticed a weak point in the seemingly random formation of the Formic ships. He fired one of the two missiles his ship had at a certain Formic spacecraft, destroying it and killing a Hive Queen.[5] As it was destroyed, the other Formic fighter ships stopped functioning as all their pilots became brain-dead, for they no longer had a Hive Queen to control them.[1]
Aftermath and Preparation for Invasion
After the defeat of the Formics around Saturn, the humans soon realized that there were no more fleets near Earth. However, the fear that the aliens would return and the desire for revenge for the millions dead motivated humanity to use the near-lightspeed technology of the Formics to take the war to them. The International Fleet immediately began constructing new ships equipped with the most current technology and sent them as they were completed to the Formics' own planets, eventually centering in on their homeworld. These warships were constructed over decades, with the ships sent later having faster lightspeed drives and better weapon tech. Along with this invading fleet, the newly designed Molecular Disruption Device was sent as a trump card to combat the might of the Formics.[1]
Unbeknownst to the humans, however, as soon as the Hive Queen was killed the Formics realized that they had attacked a sentient species, and decided not to send another fleet to Earth.[1]
The International Fleet also sent Mazer Rackham into relativistic flight so he would still be alive when the ships reached their destination and to teach the next great strategist who would destroy the Formics.[5]
However, the International Fleet needed to convince the public that they were under imminent threat of another invasion from the Formics in order to maintain the Battle School system. Thus, they lied to the world and stated that the fleets being prepared were being stationed around the comet shield to defend against the incoming Formic fleet.[1]
While waiting for the invasion fleet to arrive, the Fleet created special leadership training programs, designed to take advantage of the creative abilities of children, in an attempt to find an intellect capable of commanding such a force. These were Battle School, the Pre-Command Schools, and Command School. This system was demanded by a mid-flight Mazer Rackham, who stated that if the Fleet did not allow a young Hyrum Graff to organize a way to find a new commander for the coming invasion he would never return to Eros to train him.
Third Invasion
The Third Invasion (0 BX), later known as the War of Xenocide or the Formic Xenocide, was the third and final major conflict of the Formic Wars. Instead of the Formics attacking Earth, as in the first two invasions, the Third Invasion saw the International Fleet attacking the Formic homeworlds.[1]
After some 60 years of searching for the ideal candidate through the Battle School system, the International Fleet had discovered and cultivated Ender Wiggin to lead their attack. Wiggin trained at Command School for around a year under the tutelage of Mazer Rackham, who had just returned from his relativistic voyage. Ender was later joined by a group of other promising Battle School students to assist him in his commanding of the fleet. This group later became known as Ender's Jeesh. However, Ender and his Jeesh were led to believe that their "training" was merely simulations of real battles against the Formics by the International Fleet. In actuality, these simulations were the real battles, with Ender and his toon leaders' commands being transmitted by Ansible over the lightyears to reach the fleets out around the Formic homeworlds.[1]

An IF foot soldier during the Third Formic War.

A Formic ship being destroyed while harvesting water.

The aftermath of the use of the Molecular Disruption Device in Ender's Game (Film).
Aftermath
Immediately following the end of the Third Invasion, the League War took place, lasting 5 days and ending with the signing of the Locke Proposal. With no more alien threats to humanity, the International Fleet began to demilitarize and was banned from operating on Earth except in the event of another alien invasion. The Ministry of Colonization was formed to handle the Dispersal Project, the colonization of the now empty Formic worlds. The colony ships were equipped with weapons and shields, in case they encountered any surviving Formics or another alien race.[6]
As the years went on, people began to see the Third Invasion as a tragedy, where a beautiful sentient alien race was destroyed forever. With this, people began to see Ender Wiggin as a monster, the heinous Xenocide.[7]