Garnacho seemed to have equalized after charging into the box, but his deflected shot, which looped over Hermansen, was acrobatically cleared off the line by Caleb Okoli.
Soon after, United drew level following more brilliant play down the left by Garnacho, who was causing havoc in Leicester’s defense.
Hojlund’s flick from Garnacho’s cross was blocked, but Zirkzee was quick to tap into an empty net, marking just his fifth goal of the season.
United looked more likely to find a winner, but it came in the 93rd minute when Maguire headed the ball home.
The England defender appeared to be offside when the ball was played, but there was no VAR to review the decision.
United, currently 13th in the Premier League, ended the January transfer window with fewer attacking options, having allowed Marcus Rashford and Antony to depart.
Argentine defender Lisandro “Licha” Martinez was absent due to cruciate ligament damage suffered during last week’s defeat to Crystal Palace.
To show support, United’s players wore training tops with the message “Mucha Fuerza Licha” (Great Strength Licha).
“We thought that it would be a very difficult game, because here at Mestalla is always a hard ground to play,” Torres told TVE.
“We had the luck that we scored goals early and in the end that sunk them.”
The Spaniard netted in the third minute, running onto a fine Alejandro Balde through ball and finishing clinically against his former side.
Torres netted the second after 17 minutes when teenage winger Yamal’s shot bounced off the post back into his path.
Lopez put Barcelona three up midway through the first half with a well-timed run expertly found by Pedri Gonzalez, rounding goalkeeper Stole Dimitrievski and tucking home.
Torres completed his hat-trick after half-an-hour with an accurate low finish after Raphinha teed him up on the edge of the box.
The former Manchester City winger’s bright display offered food for thought, with Barcelona scoring at least five goals in the last four games where veteran Polish striker Lewandowski has not started.
Some Valencia fans started leaving the Mestalla stadium in anger, a constant theme around the club with owner Peter Lim criticised by supporters with chants and banners.
This was Valencia’s second thrashing at Barca’s hands in the space of two weeks, after the Catalans triumphed 7-1 at home in La Liga.
– ‘Suffer like this’ –
Valencia had a rare moment of cheer at the start of the second half when Umar Sadiq found the net but the goal was ruled out for offside.
The gangly Nigerian striker then won a penalty but that too was scrapped after he was shown to be offside again in the build-up.
At the other end Yamal struck the post again but this time the ball flew out and to safety for Valencia.
The 17-year-old Spain star got his goal eventually with a low effort which took a small deflection and beat Dimitrievski, who could still have kept it out.
Valencia are 19th in La Liga, four points from safety and Torres said he hoped they could survive in the top flight.
“I hope Valencia save themselves because in the end I’m just another fan,” added the forward.
“It’s hard to see the club of your youth and your life suffer like this, they’re really going through it.”
In San Sebastian, Ander Barrenetxea and Brais Mendez scored for Real Sociedad before Osasuna’s Alejandro Catena was sent off for a reckless challenge in the 35th minute.
Osasuna had defeated the same opponent 2-1 in La Liga on Sunday, but Catena’s red card all but ended their chances of a comeback.
La Real reached the Copa del Rey semi-finals for the third time in six seasons, with their last victory coming in the 2020 edition.