Two late goals from Michael Higdon saw the Dons bow out of the Capital One Cup at the fourth-round stage.
Karl Robinson made three changes from the stalemate at Doncaster Rovers with Kyle McFadzean, Dean Bowditch and Afobe replacing Antony Kay, Daniel Powell and Will Grigg in the starting XI.
Tom Flanagan, who kept his place at centre-back following his magnificent performance at the weekend, almost found Afobe in the third minute but the striker couldn’t quite latch on to the through-ball.
The Blades’ first real foray forward came five minutes later when Bob Harris burst into the Dons box however his cut-back, intended for Stefan Scougall, was intercepted by Dele Alli.
Shortly afterwards, a right-wing cross from Ben Davies was dealt with well by Flanagan with Marc McNulty lurking as the visitors began to threaten.
At the other end, the Dons had a penalty appeal waved away in 18th minute when McFadzean’s chip over the top appeared to be handled by Harrison McGahey.
Bowditch drew a save from Mark Howard just past the midway point of the first half before stoppages, due to injuries, stunted the game’s flow.
Howard had to be alert to keep the scores level three minutes before the break, saving Flanagan’s close-range header from a Ben Reeves free-kick, after the defender saw an initial effort blocked and come back to him.
The first real action of the second period saw a goalmouth scramble in the Dons box after Jamie Murphy chased down a loose ball and delivered an inviting cross, but the men from MK1 eventually cleared the danger.
Flanagan was then in the right place to block Scougall’s 20-yard effort before Murphy flashed an effort wide of the post – both chances coming in the 51st minute.
Scougall was presented with a golden chance less than 60 seconds later but he headed McNulty’s pinpoint cross over the top from close range.
That flurry of opportunities for the Blades seemed to kick-start the Dons, who responded with an Alli shot being deflected wide for a corner and a Bowditch drive being gathered by Howard on the hour mark.
Looking to freshen up the Dons attack, Robinson introduced Grigg and Powell for Reeves and Bowditch a minute later, but it was a man who started, Afobe, who drew the next save from the Blades stopper from 20 yards.
Afobe opened the scoring in the 67th minute, sending Howard the wrong way from the penalty spot after Alli was brought down by Craig Alcock following good work by Samir Carruthers. The expertly-taken goal took the striker’s tally in a prolific Capital One Cup campaign to six as he continued his reign at the top of the competition’s scoring charts.
Carruthers saw a 20-yard free-kick blocked 10 minutes later as the men from MK1 looked to extend their lead while, at the other end, the hosts’ defence was holding firm which included an important clearance from Darren Potter on 84 minutes.
But there was nothing the Dons could do two minutes later as substitute Michael Higdon headed home Harris’ left-wing cross to level matters.
Alli almost restored the home side’s lead within a minute but his low drive hit the base of the right post and went behind for a goal-kick.
Afobe also went close to a late winner when he forced Howard into a save following a stunning solo run in the 90th minute.
However, Higdon won it for the Blades in injury-time, firing home after the Dons failed to deal with Murphy’s left-wing corner.
Starting XI: Martin; Spence, McFadzean, Flanagan, Lewington (c); Potter, Alli; Carruthers, Reeves (Grigg 61), Bowditch (Powell 61), Afobe.
Unused subs: McLoughlin, Kay, Randall, Baker, Hitchcock.
Goals: Afobe (67).
Bookings: Potter, McFadzean.
Attendance: 8,520 (1,428 Sheffield United fans)