The Imperium Invasion occurred when the Imperium attempted to convert Earth's ecosystem to be compatible with their needs and to take over the planet.
At least a thousand years ago, the Imperium entered the Solar System, invading the first inhabited planet, Mars. They drove the Martian species into extinction, copying their shapeshifiting and telepathic abilities. However, a resistance movement fought bravely and managed to neutralize the Imperium with a nerve gas. However, by the end of the fight, J'onn J'onzz was the only Martian left. He sealed all of the Imperium forces underground and watched over them to ensure that they will never threaten their neighboring planet of Earth or elsewhere.
Thousands of years later, astronauts from Earth discovered the Imperium's resting place and accidentally awakened them while J'onn was in hibernation. Imperium agents then posed as the astronauts and returned to Earth, subtly disabling its most powerful nuclear arsenal and sabotage its deep space monitoring network to weaken Earth's defenses. This opened the door for the Imperium to invade Earth.
However, coming from the depths of space, the Imperium had no protection against the ultraviolet radiation produced by Earth's Sun and would die on contact. So they built ion factories to produce a smog that would cover the entire planet. This also weakened Superman since his body could no longer absorb yellow sunlight.
The invasion was thwarted by Batman, Superman, Green Lantern, the Flash, Hawkgirl, Wonder Woman and J'onn J'onzz. Their teamwork in stopping the invasion directly led to the formation of the Justice League. The Imperium leader was killed attempting to escape, as his mothership left Earth for parts unknown.