The First Thanos War
Many years later, Thanos begins his plan to conquer the galaxy; he builds a base on Earth and constructs a space vessel in the solar system that acts as a "universal translator" for his huge army of alien mercenaries, so that they can understand each other's language. It is at this time that Mistress Death - drawn by the level of Thanos' obsession and his now considerable power - manifests itself before Thanos, being an abstract entity and the personification of the universal concept of death. Thanos becomes determined to prove his "love" to Death for this sign of affection by destroying all life in the universe, and embarks on a quest to find the artifact the Cosmic Cube. It is at this time that Thanos finds himself opposed by the superheroes of Earth, who initially fight Thanos' forces in a rather disjointed fashion:
Iron Man and Drax storm Thanos' base and fight Thanos' minions, the Blood Brothers.
Captain Marvel becomes aware of Thanos courtesy of his cosmic awareness and explains the threat to Daredevil, the Black Widow, and Moondragon while Thanos hunts for the Cosmic Cube.
The Avengers destroy the vessel acting as a translator for Thanos' mercenaries.
Thanos eventually locates the Cube, and uses his minions the Super-Skrull and the Controller to try and destroy Captain Marvel, who rallies Eros, Mentor, Drax, Moondragon, and the Avengers against Thanos. Thanos uses the Cube and wills it to allow him to be part of - and therefore in control of - everything. Although Thanos is now omnipotent and easily defeats the heroes, he makes the mistake of discarding what he believes to be a now-drained Cube. Captain Marvel shatters the Cube, which undoes Thanos' wish. Thanos then discovers that Death has abandoned him as result of this defeat, and retreats. Iron Man later investigates Thanos' old base and together with the Thing battles the Blood Brothers again.
Thanos journeys into deep space and learns of the Universal Church of Truth, led by the being the Magus, a warped and future version of the hero Adam Warlock. Deciding that the Magus is a threat to his plans, and after finding the child Gamora—whose race has been exterminated by the Church—Thanos raises and trains her to assassinate the Magus. Thanos also joins forces with Adam Warlock, who is unaware of the fact that the Magus is actually the Champion of Life and that Thanos is the Champion of Death. The two eventually battle, and Thanos feigns defeat to allow Adam Warlock time to manipulate the timeline and undo the Magus. It is during this alliance Thanos secretly siphons off the energies of the Soul Gem that Warlock possesses, and after leaving Adam Warlock, Thanos embarks on his next quest to appease Death.
The Second Thanos War
Thanos combines the energies from the Soul Gem with the energies of the other Infinity Gems to power a weapon that is capable of destroying a star. Thanos then plans to painstakingly snuff out every star in the universe as a gift to Death. Gamora discovers Thanos' intentions and attempts to kill him, but is mortally wounded herself. Adam Warlock's unsuspecting ally Pip the Troll is also killed.
Gamora lives long enough to warn a returning Adam Warlock, who travels to Earth and enlists the aid of the Avengers, Captain Marvel, and Moondragon. After attacking and dealing with Thanos' mercenary fleet, most of the Avengers and Moondragon storm Sanctuary I, Thanos' vessel. Thor and Iron Man follow Adam Warlock and Captain Marvel, who confront Thanos directly. Captain Marvel destroys the weapon's launcher, but Thanos then kills an attacking Warlock. Thor holds off Thanos while Iron Man destroys the weapon itself, and an enraged Thanos then defeats the remaining heroes. The cosmic entities Lord Order and Master Chaos intervene, and via a subconscious message draw Spider-Man and the Thing into the battle. Spider-Man frees the fallen heroes, and then makes contact with the Soul Gem, releasing the spirit of Adam Warlock, who then turns Thanos to stone.