Maidstone threatened another FA Cup upset before seeing their hopes unravel in the second half at MK Dons.
Defender Magnus Okuonghae gave the Stones a half-time lead but the League 1 club showed their class by scoring four times after the break.
Aidan Nesbitt levelled and substitute Kieran Agard scored twice in six minutes - including a goal with his first touch - before Peter Pawlett completed victory to send Milton Keynes through to round three.
Maidstone, backed by more than 1,500 travelling fans at the magnificent Stadium MK, were looking for another league scalp after sinking Cheltenham in round one.
This was a different task altogether but, once again, United looked the part and the home crowd soon grew frustrated.
The Dons have some talented players in attack - Gboly Ariyibi and the giant Chuks Aneke in particular - while Nesbitt saw plenty of the ball out on the left.
But for all the tidiness in possession there was a reluctance to shoot in the first half and the longer that went on, the more Maidstone grew in confidence.
United had been largely untroubled before taking the lead from their first corner - won and taken by Zavon Hines - in the 25th minute.
Milton Keynes cleared to the edge of the area with Jai Reason’s half-volley parried by Lee Nicholls and there was Okounghae to finish the rebound.
Aneke fired across the face of goal as the Dons looked for an instant response while former Dons keeper Lee Worgan saved well from Ariyibi.
Okuonghae, an unlikely scorer at one end, then made a crucial tackle as Ryan Seager went to pull the trigger.
Maidstone had a couple of chances to double their lead.
The first saw Delano Sam-Yorke fire inches over when played in by Hines.
The pair combined again in first-half injury time with Sam-Yorke laying the ball on a plate for Hines who fired over when looking certain to score.
There was a scare at the start of the second half as Worgan saved at Aneke’s feet, with Ed Upson’s follow-up hitting the bar.
Sam-Yorke hooked wide when well-placed at the other end but the Dons were looking a different side with a good chance falling to Ariyibi before Worgan made a brilliant reaction save from Upson.
A goal looked on the cards and it arrived in the 54th minute as Nesbitt drilled into the bottom corner.
Milton Keynes looked to turn the screw with Worgan getting down to block from Ethan Ebanks-Landell, who eventually hit the side-netting with the follow-up.
MK Dons introduced Agard and he scored with his first touch, finishing a loose ball in the 64th minute after another Worgan save.
Agard scored again six minutes later, getting in behind Alex Finney and rolling the ball into the far corner.
Fellow substitute Pawlett scored the Dons’ fourth, forcing the ball home after Worgan kept out his first strike.
MK Dons: Nicholls, Williams, Wootton, Upson, Ariyibi, Aneke, Golbourne, Seager (Agard 63mins), McGrandles, Ebanks-Landell (Walsh 71mins), Nesbitt (Pawlett 80mins). Subs not used: Sietsma, Muirhead, Nombe, Thomas-Asante.
Maidstone: Worgan, Hare, Anderson, Okuonghae, Finney, Wynter, Lewis, Reason (Paxman 82mins), Sam-Yorke (Collins 68mins), Pigott, Hines (Loza 77mins). Subs not used: Prestedge, Wraight, Muldoon, Richards.
Attendance: 4,804 (1,541 away).