The game could have gone either way, with both sides having opportunities to score, but ultimately it was former Premier League striker Cameron Jerome who came off the bench to score the winner late on.
Barnet gave a good account of themselves, but were unfortunately unable to cause a cup shock against the much changed EFL League One team.
Story of the match
Despite being the underdogs, Barnet raced out the traps, with Ephron Mason-Clark stinging the palms of Lee Nicholls inside the first minute.
Another opportunity then came the way of the non-league side on six minutes, with only a vital Richard Keogh tackle preventing Michael Petrasso from breaking clear.
MK Dons were then forced into an early change, as midfielder Jordan Houghton limped off following a heavy tackle.
The League One side began to grow into the game after the 20 minute mark, as veteran midfielder Andrew Surman began to show his influence.
The best chance of the half fell on 31 minutes, when Dons centre-back Regan Poole saw his first-time effort crash against the underside of the bar.
Poole then turned provider for Dons' next chance, as his ball across found an unmarked Stephen Walker, but the on-loan striker fired his first time effort over, as half time approached.
The second half took a while to get going, with the first real chance arriving via Mason-Clark's speculative overhead-kick, which went wide.
MK Dons had their first real effort of the half in the 70th minute, when Carlton Morris was sent through on goal, before bending his shot just wide of the post.
Barnet then should have taken the lead a minute later, but Mason-Clark missed a header after being found unmarked at the far post.
The breakthrough finally came eight minutes from time, as Jerome turned home from close-range following a cross from fellow substitute Scott Fraser.
Barnet pushed for an equaliser with a couple of half chances, but the Dons were the closest to scoring again, however Scott Loach was there to make a brilliant diving save to deny Daniel Harvie.
Jerome then could have put gloss on the result right at the death, but fired over the bar as the game was ultimately settled by one.
National League Barnet show they still possess that Football League quality:
Barnet have spent recent history jumping between the fourth and fifth tier of English football, but are now into their third straight season in the latter.
So going into this game, you would be forgiven for expected them to roll over to much stronger opposition. But they more than held their own, especially with their impressive start to the game.
Although on the whole MK Dons had the better of play, the Bees will have felt that on another day, this performance would have been enough to see them into the third round.
Russell Martin has work to do to improve his side, but came away with all needed:
MK Dons were 49 places above their opponents heading into this game, so will have expected to come away with a victory. Especially considering Barnet's struggles in the league.
But instead we saw a performance of a side who could have been mistaken for being in the same league as them.
There was an improvement after the break, but had only a fleeting number of chances. Thankfully for them, they managed to take one of them.
So they can come away happy that they are in the hat for the next round, but Martin will know that his team will have to play far better if they are to make it any further in the competition.
Man of the match
The 21-year-old forward was lively throughout the game for the non-league side, causing problems for the Dons defence. And although he is yet to score this season, he certainly looked the most likely to do so for Barnet today.
He had a chance to score inside the first minute, with only a good save denying him, as well as an overhead-kick, which sprung the second half into life.
And he also had arguably their best chance with 20 minutes to go, missing a close range header which would have changed the dynamic of the game.
If he can improve on his finishing, then Barnet will have an exciting young player on their hands.