Ranieri, 65, was dismissed last Thursday, nine months on from Leicester's fairytale title win, and fans honoured him with banners, masks and a smartphone light show in the 65th minute.
His former charges were unrecognisable from recent weeks, with Danny Drinkwater also on target yesterday as they snapped a run of five straight defeats to climb out of the relegation zone to 15th place.
"All I asked of the team was to remember what they were about and remember their identity," said Leicester caretaker manager Craig Shakespeare.
Vardy's first-half opener was Leicester's first league goal in seven games and made them the last team from Europe's five major championships to find the net in 2017.
Also Read
While the display will give Leicester's fans hopes of a late-season rally under Shakespeare, it leaves unanswered questions about why things had gone so badly wrong under Ranieri.
Asked if he wanted the job full-time, Shakespeare said: "My remit was get them ready for Liverpool and I have done that. Let's see what happens."
Jurgen Klopp's side, who replied through Philippe Coutinho, have won only one of their last seven league games and look a shadow of the team who looked poised to challenge for the title just weeks ago.
"We let them be the Leicester of last year -- that's our fault," Klopp said.
"We should get criticised. This inconsistency makes absolutely no sense."
- Sumptuous -
=============
Save for the presence of Wilfred Ndidi and the absence of the departed N'Golo Kante, it was the team that won the title and there was energy and aggression to Leicester's play from the off.
Simon Mignolet was tested three times in the first 18 minutes, fielding a header from Robert Huth, pushing Okazaki's flicked header behind and parrying from Vardy, while Huth headed over.
The breakthrough came in the 28th minute and it was lifted straight from Leicester's 2015-16 songbook.
Marc Albrighton's slide-rule pass freed Vardy to scuttle in behind Joel Matip and steer a shot past Mignolet for his first goal in eight league games.
Albrighton's cross from the left was headed away by James Milner and fell kindly for Drinkwater, who speared a sumptuous 25-yard shot into the bottom-right corner.
Leicester goalkeeper Kasper Schmeichel showed alertness to thwart Coutinho and Emre Can either side of Drinkwater's strike and Coutinho tested him again early in the second half.
Vardy put the hosts 3-0 up on the hour, leaping above Can to glance a fine header past Mignolet from Christian Fuchs's in-swinging cross.
But despite late pressure, they succeeded in holding Klopp's men at arm's length, with Schmeichel denying substitute Divock Origi and fumbling a Coutinho strike just wide of his right-hand post.