The club have triggered options in their loan deals to bring them to Molineux on long-term contracts.
Both players helped Wolves earn promotion to the Premier League.
Afobe scored six goals in 16 Championship fixtures to fire Nuno Espirito Santo’s side to the title.
The 25-year-old striker was previously a Wolves player from January 2015 to January 2016 and has rejoined the club from AFC Bournemouth.
Boly, a 27-year-old central defender, joins from Porto after making 37 appearances in the season just gone.
They are Wolves' first two signings of the summer transfer window.