“
Adam Warlock was artificially created by the Enclave in a scientific complex on Earth called the Beehive. He was born in a cocoon and was intended to be the “perfect human”. His creators wanted to use him to take over the world.
In this travels, he comes across someone known as the High Evolutionary, who is crazy powerful. The High Evolutionary gives Adam the name Warlock, and that is when stuff gets really awesome. He gives Warlock the Soul Gem, one of the six Infinity Gems, which allows him to capture the souls of other beings.
Eventually Adam learns of the other Infinity Gems and the fact that Thanos is collecting them all. Warlock then teams up with Moondragon, Captain Marvel, and the Avengers to take on Thanos. It is at this point, right in the heat of the battle, that his younger self shows up and takes his soul.