The hosts bossed the bulk of the first half without seriously extending MK Dons, who had not conceded a goal in their previous three matches.
But the Dons opened the scoring on the stroke of half-time with a stunning free-kick by Jason Puncheon.
Southampton central defender Radhi Jaidi was cautioned for a foul on Jermaine Easter and Puncheon bent the resulting free-kick around the Southampton wall and inside goalkeeper Kelvin Davis's near post.
Southampton made a double substitution eight minutes into the second half and promptly turned the match on its head.
Within minutes, Hammond equalised at the far post from a cross by Lloyd James, whose free-kick 20 minutes later picked out Lambert to fire Southampton ahead with his ninth goal of the season.
MK Dons piled the pressure on in search of an equaliser but were caught on the break in injury time when Connolly intercepted a back pass to slot home.