Afobe opened the scoring in the 21st minute and grabbed a second after 63 to take his tally to five in seven games following last month’s £2m move from Arsenal – adding to the 19 he scored while on loan at MK Dons earlier in the season.
Nouha Dicko had scored his 10th goal of the season in the 28th minute with Dave Edwards and Bakary Sako completing the rout as Wolves revived their promotion push, having won just one of their previous five games.
Rotherham, who slipped to only their second defeat in six games, had chances to find a way back into the match at 2-0 down but, where Wolves took theirs, the Millers floundered as well as being denied by goalkeeper Tomasz Kuszczak.
They have now conceded 11 goals in their last two visits to Wolves after losing 6-4 last season.
After a tepid opening when Wolves winger James Henry fired wide, Afobe brought the game to life with a fine piece of finishing.
His strike owed everything to the vision of midfielder Kevin McDonald whose through ball split the Rotherham defence in two. Afobe latched on to the pass and calmly slotted his shot beyond the on-rushing Rotherham goalkeeper Adam Collin.
It was a goal that launched a sustained spell of Wolves pressure that would eventually see Dicko double their advantage.
Rotherham were fortunate to survive when Henry had two shots in a matter of seconds that were blocked on the line – the second producing a stunning save from Collin.
Dicko then flashed an effort wide but proved to be more clinical when Afobe released him and he gave Collin no chance with a well-placed shot from the edge of the area.
Rotherham could easily have folded completely after the quick-fire double but they had chances to get back into the game before half-time.
Wolves had two lucky escapes when Richard Stearman headed against his own post and Adam Hammill’s finishing let him down as he saw a weak effort easily dealt with by Kuszczak following good play from Matt Derbyshire and Danny Ward.
Derbyshire was found wanting in front of goal on the stroke of half-time when he was picked out by Paul Green’s header only to swing at the ball and have an air shot just seven yards from goal.
Rotherham continued to press at the start of the second period, but Kuszczak’s save from Derbyshire’s 62nd-minute header proved to be crucial.
Just 60 seconds later, Wolves surged up field and Afobe outpaced the Rotherham defence after a through ball from Henry before rounding Collin and rolling the ball into an empty net.
Rotherham’s dismal day was summed up when Kuszczak spectacularly tipped away a fierce drive from Hammill.
Edwards then flicked in a corner from Sako at the near post in the 74th minute before Mali international Sako completed the rout with a clinical finish 10 minutes from time after good work by Rajiv Van La Parra as Rotherham’s dismal away record was extended to just one win in 15 games in all competitions.