
The game appeared to be heading into extra time before Maguire headed in the winner in the 93rd minute from Bruno Fernandes’ free kick, seconds before the final whistle.
The result handed United only their third win in their last eight games at Old Trafford across all competitions.
United were poor in the first half and Leicester capitalised in the 42nd minute when Wilfred Ndidi’s shot was blocked by keeper Andre Onana but Bobby De Cordova-Reid was there to head in the rebound from close range.
Zirkzee levelled in the 68th minute when Rasmus Hojlund’s effort was blocked by defender Caleb Okoli and the ball fell perfectly for Zirkzee to tap home just three minutes after he entered the game.