The 66-year-old, who led the Foxes to the Premier League title two years ago, took charge of the Ligue 1 side last June on a two-year deal.
Ranieri had taken Nantes to third in the table after 10 games, and they had stayed in the top five for most of the season, but a late drop in form saw the Canaries slip to 10th in the standings.
"The club and the coach have decided to part company by mutual agreement," Nantes president Waldemar Kita said in a statement.
"We thank Claudio Ranieri and his staff for all the work done this season. We wish them a lot of success in their future projects."
Ranieri added: "I want to thank the President because he offered me the chance to come to Nantes and to return to the French league.
"I want to thank my players because the first half of the championship was wonderful, although the second part was more difficult. They gave everything, it really matters to me."
Ranieri, whose final game will be against Strasbourg on Saturday, is one of the names being linked with the vacant manager's job at West Ham United following the departure of David Moyes.