Afobe, who had also been on target in the opening day success at Blackburn, struck from the penalty spot in the 58th minute to seal a hard-earned success for the hosts.
Newport, who before the game announced their board of directors had stood down to hand interim control of the club to Newport County’s Supporters Trust, had stunned Wolves when Scott Boden gave them a sixth minute lead.
Boden was left unmarked to head home a cross from Danny Holmes after good work by Alex Rodman to dispossess Kortney Hause.
But their joy was short-lived as Nouha Dicko soon drew Wolves level in the 15th minute – converting a cross from Sheyi Ojo after the on-loan Liverpool winger had collected the loose ball when his free-kick had been parried by Joe Day.
Dicko also had a hand in Wolves’ decisive second goal when he fed a neat pass into the path of Afobe.
Afobe was about to shoot when he was hauled down by Scott Barrow, and referee Darren Bond had no hesitation awarding a penalty.
The former Arsenal trainee calmly converted from the spot but Newport still made Wolves fight all the way for their victory with substitute Tom Owen-Evans threatening to take the tie into extra time only to see his 82nd minute shot saved by Emiliano Martinez.