In order to make Deadpool the way they wanted, 20th Century Fox had to trade the use of one of the Marvel characters under its film rights deal back to Marvel Studios. According to Deadpool screenwriter Paul Wernick (via The Playlist), Fox had to cede use of Ego the Living Planet to Marvel in exchange for the rights to alter the onscreen powers of Negasonic Teenage Warhead.
Negasonic Teenage Warhead has psychic abilities in comic books, but in Deadpool, she possesses explosive kinetic powers similar to Cannonball of the New Mutants. To make this change, Fox reportely gave Ego back to Marvel, allowing the Living Planet to appear in Guardians of the Galaxy Vol. 2, played by Kurt Russell.
Ego was presumably under Fox's control as a result of their ownership of the rights to Marvel's Fantastic Four characters, though he debuted in Thor #132, appearing in around 20 subsequent issues of that series, as opposed to only a handful of appearances in Fantastic Four. Ego did appear in one issue of Deadpool, 2011's Deadpool #34.
Interestingly, Negasonic Teenage Warhead takes her codename from a song by the band Monster Magnet, who also recorded a song entitled "Ego The Living Planet."
Wernick also said that Fox controls "400 Marvel characters," though it's unclear whether this statement was an actual estimate of Fox's stable, or hyperbole. The exact terms of Fox and Marvel's contracts have never been made fully public.
Guardians of the Galaxy Vol. 2 is due out in theaters May 5, 2017, while Deadpool 2 is currently in pre-production with no release date announced.