Van Nistelrooy has replaced Steve Cooper at the King Power Stadium and saw Jamie Vardy open the scoring after just 98 seconds.
Bilal El Khannouss and Patson Daka added goals after the break to ensure the Dutchman started with three points in style.
His task is to keep the Foxes in the Premier League this season and after ending a five-game winless run they moved up to 15th, four points clear of the relegation zone.
Earlier on Tuesday night, Jean-Philippe Mateta fired Crystal Palace to a first Premier League away win of the season and left Ipswich Town still without a victory on home soil.
Mateta struck in the second half to secure a 1-0 success for the Eagles with the only real piece of quality in a nervy encounter between two struggling teams on Tuesday night.
It was the French forward's sixth goal of the season, and his first away from Selhurst Park.
Jean-Philippe Mateta, that is INCREDIBLE 🤯— Optus Sport (@OptusSport) The Frenchman with his finest R9 impression to put Crystal Palace ahead.The step over. The dink. It's just beautiful.�Watch | https://t.co/UM954naBMC pic.twitter.com/8vmETQEug0December 3, 2024
It is now two wins and three draws from the last six matches for Oliver Glasner's side, whose winter revival is gathering pace nicely following a sticky start to the campaign.
They are up to 16th on 12 points, while Ipswich, who were missing Socceroos Massimo Luongo and Cameron Burgess, remain on nine and in 19th.
West Ham's hierarchy will have seen what impact a managerial change can have as the jury remains out on Lopetegui, with away fans making their feelings clear by chanting "You're getting sacked in the morning".
Niclas Fullkrug scored a consolation goal at the death but it counted for nothing and forthcoming games against Wolves, Bournemouth, Brighton & Hove Albion and Southampton could determine the Spaniard's future.
When Van Nistelrooy went to bed last night, even he would not have dreamt of his side starting as well as they did as they went ahead with less than two minutes on the clock.
Veteran striker Vardy rolled back to the years as, living on the shoulder of the West Ham defence, he raced clear from El Khannouss' through-ball and slotted into the corner.
Leicester doubled their lead just after the hour.
Kasey McAteer was set clear down the left and his ball inside was perfect for El Khannouss to find the bottom corner from 15 yards.
The Foxes, who also had a goal from substitute Bobby De Cordova-Reid chalked off by VAR, wrapped things up in the 90th minute when Daka broke clear and emphatically converted into the roof of the net.