Leicester, who remain in second place for now ahead of Hull's evening kick-off at Brighton, looked like making it six straight victories when Ben Marshall put them in front at the start of the second half.
But Peterborough, unbeaten in their last five home league matches after this result, hit back through Davide Petrucci's superb strike before McCann completed the turnaround two minutes from time.
Winger Nathaniel Mendez-Laing and on-loan Manchester United midfielder Petrucci were recalled as Posh boss Darren Ferguson switched to a 4-4-2 formation.
Nathaniel Knight-Percival, part of a three-man defence against Burnley last weekend, and teenager Joe Newell were the players to make way as they dropped down to the bench.
Injury forced Leicester manager Nigel Pearson to change a winning team.
In-form striker Chris Wood suffered an injury in training late in the week, causing the Kiwi to miss out entirely, and Jamie Vardy replaced him in the starting line up.
A bright start to the game saw chances at both ends. Leicester captain Wes Morgan flung himself in front of George Boyd's goalbound effort before Peterborough goalkeeper Robert Olejnik bundled Marshall's free-kick round a post.
Foxes keeper Kasper Schmeichel had to be at his best midway through the first half to get down low and push McCann's free-kick wide of his left-hand post as it looked to be creeping into the bottom corner.
Lee Tomlin was unlucky not to see a tidy piece of skill rewarded with a goal when he brought down a long ball and turned his marker but his shot, with Schmeichel beaten, went wide.
The best chance of the first half was created by Leicester after 33 minutes. Paul Konchesky marauded forward from left-back and picked out David Nugent with a cut-back but the Foxes' leading scorer saw his first-time shot brilliantly saved one-handed by Olejnik down to his left.
Dwight Gayle had a chance just before half-time when he found himself free in the penalty area but Morgan was on hand again to make an excellent block.
The visitors took the lead with a well-worked move seven minutes into the second half.
Midfielder Danny Drinkwater burst into the box down the right and Vardy dummied his low cross allowing Marshall to sweep a shot into the top corner of the net from 10 yards out.
Vardy came within a studs length of making it 2-0 shortly afterwards but was just unable to get a touch to Nugent's driven, low cross.
At the other end, Morgan made further blocks midway through the second half to thwart Tomlin and then Petrucci before Schmeichel saved at his near post from Boyd.
Peterborough were piling on the pressure and they got their reward after 74 minutes when Petrucci thumped an unstoppable right-foot volley from the edge of the area into the top corner of the net.
Posh's tails were up and Schmeichel had to push away a shot from Tomlin, but there was little the Dane could do to keep out McCann's winning goal.
The hosts broke down the right and Tomlin teed-up Boyd inside the box.
Boyd showed tremendous composure with Leicester defenders streaming around him, picking out McCann on the edge of the box and the Ulsterman drilled a low shot into the bottom left-hand corner of the net.
Substitute Martyn Waghorn had a glorious last-minute chance to rescue a point for the Foxes but swept his shot over the crossbar, while Tomlin hit the bar at the other end as Peterborough counter-attacked.
- Sports & Recreation
- Ben Marshall
- Jamie Vardy