Second-placed Posh took command with two goals in the space of three minutes in the second period before sealing the points late on.
Szmodics slotted the opener past goalkeeper Sam Walker in the 49th minute after the visitors were undone by fine passes from Reece Brown and Siriki Dembele.
He quickly doubled the advantage with a fine 52nd-minute finish into the far corner after collecting a Nathan Thompson pass and bursting into the box.
Szmodics twice fluffed chances to complete his hat-trick before top-scorer Jonson Clarke-Harris bagged a fortunate 20th goal of the season in the 90th minute.
Dons defender Nesta Guinness-Walker’s attempted goal-line clearance slammed into the Posh frontman and flew in.
It meant a losing start for Mark Robinson as permanent AFC Wimbledon boss following a spell in interim charge.
The loss of debutant striker Shayon Harrison – who was stretchered off only a few minutes after being introduced in the second half – added to the visitors’ misery.
Hull’s promotion push suffered a major setback as they blew a two-goal lead at Doncaster in League One and saw George Honeyman leave the field on a stretcher.
The second-placed Tigers looked to be soaring to a second straight win as they led 3-1 at the break through a brace of Mallik Wilks headers and a first club goal for Jacob Greaves, with Reece James replying for Rovers.
But Omar Bogle’s 68th-minute penalty gave the hosts hope and after a delay for Honeyman to be carried off on the stroke of full-time, James Coppinger fired home a direct free-kick to snatch a 3-3 draw.
The result saw Grant McCann’s men slide out of the top two thanks to the Posh win.
And it also enabled Lincoln to extend their lead at the top, though they had to come from behind to beat struggling Wigan 2-1 at the DW Stadium.
Michael Appleton’s side went into the game on the back of two successive draws and faced another tough afternoon when Callum Lang fired the hosts in front just past the half-hour mark.
Anthony Scully equalised almost immediately but Lang came close again for the Latics, before Tom Hopper’s 73rd-minute effort sealed victory for the away side.
There was a shock for Portsmouth who fell to a 1-0 defeat to Blackpool at Fratton Park, with Jerry Yates grabbing an 82nd-minute winner.
Sunderland cruised to a 3-0 win at bottom club Burton, who had Josh Earl sent off in the 56th minute.
The Black Cats grabbed the lead inside two minutes through Grant Leadbitter and Lynden Gooch added a second on 32 minutes, before the in-form Charlie Wyke wrapped up victory late on.
MK Dons launched a dramatic late comeback to beat Northampton 4-3 and extend the Cobblers’ run without a win to nine games.
Fraser Horsfall’s second-minute opener for the visitors was cancelled out by goals from Andrew Surman and Will Grigg before half-time, but Northampton levelled through Ryan Watson just after the break.
Peter Kioso’s 78th-minute effort looked to have won it but the home side equalised through Cameron Jerome on 83 before Charlie Brown grabbed the points five minutes later.
Shaun Whalley’s 77th-minute equaliser grabbed a point for Shrewsbury at Accrington, who had to settle for a 1-1 draw despite Seamus Conneely’s 47th-minute opener.
Scott Twine’s injury-time strike grabbed three precious points for Swindon in a 2-1 win over Crewe, who led through Tom Lowery’s fifth-minute effort before a Travis Johnson own goal hauled Swindon level.
Paddy Madden equalised for Fleetwood in a 1-1 draw against Charlton, who led early through Jayden Stockley’s header, while a brace from John Akinde saw Gillingham beat Bristol Rovers 2-0.
Ipswich were held to a goalless draw at home to Oxford while a similar deadlock at Rochdale saw Plymouth extend their unbeaten league run to nine games.