Juventus, Lyon and Newcastle United all reportedly made approaches for the 20-year-old, but Patrick Vieira's men have won the race.
A France Under-21 international, N'Soki made his Ligue 1 debut for PSG in 2017 and registered 12 top-flight appearances last season.
The left-back signed his first professional contract in the French capital in September but Juan Bernat and Layvin Kurzawa blocked his path to greater first-team opportunities.
Nice pounced to make him its fourth signing in three days after sealing deals for Kasper Dolberg, Alexis Claude-Maurice and Adam Ounas.
The length of N'Soki's contract has not been disclosed.