The left-sided centre-back joins Forest from the German side on a three-year contract, with a one-year extension option, believed to be worth €10m (£8.5m) plus €5m (£4.2m) in add-ons.
The 26-year-old made 128 appearances for Mainz 05 since joining them in 2018 from Metz, captaining the Bundesliga side to an eighth-place finish last season.
Niakhaté said: “For me, this a dream to come to England and to sign for such a historic club in Nottingham Forest. The club is well known around the world and its fans are incredible. The Premier League is also the best league in the world and every player wants to play here.
“I’m just so excited to get started in pre-season, meet my new teammates and get ready for the new season, wearing the Garibaldi red and white at the City Ground.”
Steve Cooper added: “Moussa comes to Forest with a wealth of experience in one of Europe’s top competitions, having enjoyed four seasons with Mainz in the Bundesliga. In addition to being a strong, fast and accomplished centre back, he’s captained Mainz to their best league finish in the last five years, and his leadership experience is invaluable for our return to the Premier League.
“Moussa has attracted the interest of multiple clubs, but he has chosen Nottingham Forest and we are delighted to welcome him into the squad.”