The Expansion was Ego's plan to conquer the entire universe.
After finding so much disappointment in life he found, Ego planted several parts of himself on numerous Homeworlds, in order to complete this plan, Ego needed two Celestials and began mating with several other lifeforms. He hired criminal Yondu Udonta to collect several of his children. However, none of his children had carried the Celestial gene, so he killed them all. after learning what Ego had done and had planned to do, Yondu kept and raised Peter Quill in order to protect him from his own megalomaniac father
Twenty-six years later, Ego attempted to "seduce" his son to the "dark side". However, due to Peter's love for his friends and family, Peter fought back and later sadly watched his father die in front of him.