Ali Gerba's first goal for MK Dons had put the home side in front in the second half.
But Craig Mackail-Smith controversially equalised from the penalty spot and substitute Dominic Green got the winner just minutes later.
It was Posh's first away win of the season and one they probably just about deserved with George Boyd tormenting the Dons throughout.
The first half was tentative as neither side wanted to give much away.
Shaun Batt headed an early chance wide and in reply Mark Wright should have done better when he cut in well from the left and ran towards goal only to hit a curling effort straight into the arms of Joe Lewis.
Aaron Wilbraham turned Craig Morgan inside out on the edge of the box but the former Dons defender was just able to block his shot from the edge of the box.
But that was one of the last bits of action that saw from the striker as he limped off to be replaced by Sam Baldock.
Posh had been struggling to get into the game up that point but in the last 15 minutes they upped the tempo.
Batt earned a free-kick on the very edge of the box and Tom Williams had the resulting shot, but it was poor and straight into the wall.
Then with five minutes of the half left, Batt had the chance of the game.
Boyd showed superb skill as he pirouetted past Miguel Llera and his cut back was cleared as far as Batt, whose shot crashed off the post before being cleared.
The second half had more pace to it and Posh should have taken the lead on 56 minutes when Boyd was afforded too much time and was able to play Mackail-Smith through one-on-one, but Willy Gueret read the striker well and was able to palm his effort away.
Then on 63 minutes, Canada international Gerba struck.
Baldock timed his pass superbly and, although he scuffed his shot a little, Gerba was just able to guide the ball past Lewis.
Posh to their credit came straight back at the Dons and earned the penalty with 20 minutes left.
Llera and Sean O'Hanlon got in each other's way allowing Mackail-Smith to go through on goal.
Gueret superbly cleared at his feet but, from the resulting cross and with the keeper still on the floor, Alan Navarro was judged to have handled.
Mackail Smith sent Gueret the wrong way from the spot to level.
Then four minutes later, Green was put through on goal and he hit a superb shot across goal beyond Gueret.