The France-born defender, who had two years left on his contract with the Premier League club, has agreed a deal worth 31 million euros ($33.5 million) which runs until 2028.
Niakhate returns to France where the 28-year-old began his youth career in Lille before moving to Valenciennes in the 2014-2015 season and Ligue 1 side Metz in 2017.
He joined Bundesliga club Mainz for 10 million euros in 2018, captaining the German side and making 128 appearances over four seasons.
The defender joined Forest in 2022 where he played 37 matches, twice helping the team consolidate in the Premier League after a 23-year absence.
“We wish Moussa all the best for the future and thank him for his contributions during his time at the club,” the English club said in a statement.
Niakhate has 11 caps with Senegal since 2023, having played for France’s youth teams.
His deal comes 24 hours after Lyon announced they had sealed a deal with manager Pierre Sage until 2026.
Sage, 45, had stepped in as a temporary replacement for Italian Fabio Grosso in November 2023, with the former multiple French champions languishing last in Ligue 1 with a mere seven points.
He revived the club’s fortunes with Lyon finishing the season with 46 points in sixth place to qualify for the Europa League, and making it to the French Cup final.
© Agence France-Presse
Photo: Clive Brunskill/Getty Images