The Cod Army, who have now lost their last five away games, struck first through David Ball only to be undone by Afobe’s 12th goal of the season as the Dons lifted themselves to fourth.
Fleetwood goalkeeper Chris Maxwell was called into action when he kept out Dean Bowditch’s curling shot as MK Dons controlled the first half without reward.
Completely against the run of play, the visitors went ahead in the 52nd minute when Ball got on the end of Conor McLaughlin’s long pass and chipped the ball over the stranded David Martin.
The Dons hit back just after the hour-mark when Ben Reeves teed-up Kyle McFadzean, whose shot from the edge of the area arrowed into the net.
The hosts completed the comeback with six minutes left when Samir Carruthers was felled by Stephen Crainey and Afobe showed no nerves when rolling in his penalty.