The former Arsenal and France midfielder leaves New York City FC after a two-and-half year spell in charge of the MLS side.
Vieira will replace Lucien Favre at Nice, who finished eighth in the French league last season.
Ligue 1
UEFA to review financial fair play decision on PSG
03/07/2018 AT 14:36
He returns to Ligue 1 - 23 years after leaving Cannes to join Milan in 1995.
"I am fulfilled, happy," said Vieira. "This is what I was looking for: I will work in good conditions with passionate people, who will support me in the good as the bad times. I'm very happy to be here."
Vieira, 41, will be joined in Nice by his assistant Christian Lattanzio and members of the New York backroom staff including performance coach Kristian Wilson and physical performance coach Matt Cook.
“I would like to thank City Football Group and New York City FC for the opportunity to have coached this tremendous football club. Leaving New York is an incredibly difficult decision for me and for my family and one that has not been taken lightly," said Vieira
“From the beginning, City Football Group and its leadership, particularly our Chairman Khaldoon Al Mubarak, Brian Marwood, Ferran Soriano and Marty Edelman have believed in me and have helped guide me through the last eight years of my career – starting with my time as a player and ultimately culminating with my first opportunity to manage a First Team.”
Vieira retired at Manchester City in 2011 and began his coaching career at City's youth team before joining New York and guiding them to successive play-off appearances. The team are currently second in the Eastern Conference.
"Nice were looking for a coach with the ability to continue to produce attractive football, to bring through youngsters by taking risks to help them grow, and someone who lives and breathes to win," President Jean-Pierre Rivere said on the club's website.
"This coach is called Patrick Vieira.."
The Frenchman earned 107 caps for his nation and was part of the team that won the 1998 World Cup and the European Championship two years later.
Ligue 1
PSG cleared of breaching financial fair play rules
13/06/2018 AT 16:31
Ligue 1
Paris Saint-Germain in talks to sign £70m-rated Kante from Chelsea - report
11/06/2018 AT 09:12