Ndidi was the final signing as Leicester manager for Ranieri, who returns as Watford boss this weekend.
The midfielder was Ranieri’s final signing at the Foxes when he joined from Genk for £17million in January 2017.
The Italian returns to the King Power Stadium with Watford on Sunday, the first time he has visited as a manager since he was sacked in 2017, just nine months after winning a shock Premier League title.
Ndidi has made 188 appearances for the Foxes, helping them win the FA Cup last season, and thanked Ranieri for having faith in him.
“I’m very grateful to him because he gave me the opportunity to come to Leicester and play in the Premier League for the first time,” Ndidi said.
“That was a really important move in my career, so I’ll always remember it. Joining Leicester City has been fantastic for me. It’s a great club.”
The Nigeria international, 24, scored in Thursday’s 3-1 Europa League win over Legia Warsaw which left the Foxes’ European destiny in their own hands ahead of their final Group C game at Napoli next month.
It was a welcome victory after an inconsistent Premier League campaign, with the side having won just twice in their last nine games to leave them 12th – although just four points off the top six.
“It’s really tight at the moment, which makes this busy period of games really important,” Ndidi told the club’s official site. “For us, as a team, this is the perfect time to turn things around.
“We’ve shown before how strong we can be when we have momentum and, if we can start putting that together in the Premier League, we’ll see the benefits in the table. We know what we’re capable of and we’re striving to reach our top level.
“We’re expecting a tough game but one which provides a great opportunity to build confidence and pick up points.
“They had a great result against Manchester United in their last game so we know they will be feeling good but we’re playing at home, in front of our fans, and we believe we can get the win.”