Jamie Vardy, Bilal El Khannouss and Patson Daka got the goals as Van Nistelrooy enjoyed a dream start to his new role shortly after his departure from Manchester United.
The Dutchman said he had been "astonished" by the number of offers he received after a four-game spell as interim United boss, which included two wins over Leicester.
A lethal finisher in his playing days, Van Nistelrooy watched on approvingly as Vardy opened the scoring after just 99 seconds at the King Power.
The 37-year-old had initially been flagged offside, but a VAR review showed he was clearly on for his fifth goal of the season.
Defeat ramps up the scrutiny of Hammers boss Julen Lopetegui after a seventh defeat in 14 Premier League games.
The visitors enjoyed the majority of possession and had 31 shots to Leicester's eight but failed to make it count.
West Ham did have a goal controversially ruled out when Leicester goalkeeper Mads Hermansen punched the ball into his own net and was relieved to be awarded a foul due to minimal contact from Tomas Soucek.
Conor Coady also cleared off the line from Crysencio Summerville in the second half.
But Leicester remained a threat on the counter-attack and doubled their lead when El Khannouss coolly stroked home Kasey McAteer's pass.
Daka then blasted in to make it 3-0 before Niclas Fuellkrug netted a late consolation with his first West Ham goal.
Victory lifts Leicester up to 15th, four points above the relegation zone, and within two points of 14th-placed West Ham.
Guehi defies FA
Jean-Philippe Mateta scored the only goal at Portman Road as Palace won the battle of two more sides at the bottom end of the table.
The Frenchman produced a classy finish from Eberechi Eze's pass on the hour mark to secure the Eagles' first away win of the season.
Palace pull three points clear of the bottom three, while Ipswich remain second from bottom and winless at home on their return to the top flight.
However, Palace captain Marc Guehi is now at risk of a suspension after defying a Football Association warning over displaying religious messages.
As part of the "Rainbow Laces" campaign to show support for the LGBTQ+ community, Premier League captains are wearing rainbow-coloured armbands.
Guehi's armband bore the message "I love Jesus" during their 1-1 draw against Newcastle, prompting the FA to contact Guehi and Palace and remind them of rules forbidding the display of religious messages.
The England defender doubled down on his message with "Jesus loves you" displayed on his rainbow-coloured armband.
Ipswich captain Sam Morsy, who also caused controversy by opting not to wear the rainbow armband against Nottingham Forest at the weekend, once again wore a regular armband.
His club issued a statement on Monday saying he chose not to wear the rainbow armband due to his religious beliefs.
© 2024 AFP