Erik ten Hag was sacked as manager on Monday, with Van Nistelrooy being placed in charge on a temporary basis ahead of the expected arrival of Sporting Lisbon's Ruben Amorim as the new head coach.
Man United made the breakthrough in the 15th minute of the contest courtesy of a wonderful strike from Casemiro, with the Brazilian picking out the top corner from distance after being found by Alejandro Garnacho outside the penalty box.
Garnacho then got his name on the scoresheet in the 28th minute, with the Argentina international brilliantly turning a cross from Diogo Dalot into the back of the net to register his sixth goal of the campaign.
Leicester had one back in the 33rd minute, with Bilal El Khannouss' strike from distance hitting both posts before dropping into the back of the net, with the Foxes having a lifeline shortly after conceding a second.
However, Bruno Fernandes scored a third for the Red Devils three minutes later, with his free kick finding the back of the net, albeit with the help of a huge deflection off the head of Leicester's James Justin.
Three then became four in the 39th minute, with Casemiro registering his second by smashing the ball home from close range after his header had come off both posts, but Leicester incredibly answered back before the interval, with Conor Coady netting a second for the Foxes to make it 4-2 to the hosts at the half-time break.
Man United had their fifth just before the hour, as Fernandes made the most of a short pass from Caleb Okoli before rounding the Leicester goalkeeper and finishing from close range, and that proved to be the end of the scoring, with the 20-time English champions comfortably progressing to the quarter-finals of the competition.
MAN UNITED VS. LEICESTER HIGHLIGHTS
Casemiro goal vs. Leicester (15th min, Man United 1-0 Leicester)
What a goal from Casemiro! A clever step-over from Fernandes sees a Garnacho pass find Casemiro, and the midfielder smashes one into the top corner from distance; Leicester goalkeeper Danny Ward stood absolutely no chance there.
Alejandro Garnacho goal vs. Leicester (28th min, Man United 2-0 Leicester)
Man United double their advantage in the 28th minute of the contest, and this time Garnacho is on the scoresheet, as the forward fires home at the far post after an excellent cross from Dalot had found him in a dangerous area.
33rd min: Man United 2-1 Leicester (Bilal El Khannouss)
Leicester have one back in the 33rd minute, as El Khannouss registers from outside the box, with his strike coming off both posts before dropping into the back of the net. Man United's number two goalkeeper Altay Bayindir will be disappointed, as he had palmed a cross into a dangerous area before El Khannouss had his strike.
Bruno Fernandes goal vs. Leicester (36th min, Man United 3-1 Leicester)
Man United have their third of the match, as Fernandes' free kick hits Justin and finds the back of the net. Unlucky for Leicester, but Man United have restored their two-goal advantage at Old Trafford.
Casemiro goal vs. Leicester (39th min, Man United 4-1 Leicester)
Man United have their fourth in the 39th minute, as Casemiro smashes home from close range after hitting both posts with a header. It is absolutely raining goals at Old Trafford in Van Nistelrooy's first game at the helm.
Conor Coady goal vs. Men United (48th min, Man United 4-2 Leicester)
Leicester have their second of the match, as Coady fires into the bottom corner after the ball had broken for him inside the Man United box - it has been a quite incredible opening 45 minutes of EFL Cup football at Old Trafford.
Bruno Fernandes goal vs. Leicester (59th min, Man United 5-2 Leicester)
Man United have their fifth of the match, as Fernandes capitalises on a short pass from Leicester defender Okoli before rounding the goalkeeper and finishing into the back of the net to make it 5-2.
MAN OF THE MATCH - CASEMIRO
It would be fair to say that Casemiro has struggled to find his best form this season, but the Brazilian scored against West Ham United on Sunday and was absolutely sensational for the Red Devils against Leicester.
The experienced midfielder made the breakthrough with a stunner from distance, before scoring a second shortly before the interval after hitting both posts with a header, while he was also defensively brilliant during a five-star display in Manchester.
MAN UNITED VS. LEICESTER MATCH STATS
Possession: Man United 53%-47% Leicester
Shots: Man United 23-18 Leicester
Shots on target: Man United 10-8 Leicester
Corners: Man United 5-3 Leicester
Fouls: Man United 9-5 Leicester
WHAT NEXT?
Both teams will now switch their attention back to the Premier League, with Man United welcoming Chelsea to Old Trafford on Sunday afternoon for a huge fixture in England's top flight.
Leicester, meanwhile, will be aiming to bounce back from the disappointment of exiting the EFL Cup when they resume their league campaign away to fellow strugglers Ipswich Town on Saturday afternoon.