"Having the opportunity to be a head coach in New York is something many dream of," Vieira said. "Our incredibly passionate fans have made this one of the most special experiences I've had in football. Thank you to each and every one of you that stands by the team day in and day out."
The 41-year-old will take over from Lucien Favre at Nice following the Swiss' recent appointment by Borussia Dortmund.
After the news broke, Vieira posted the following message to New York fans on his Twitter account:
The former France international retired from football in 2011 and moved into coaching, taking charge of Manchester City's under-21 side.
Vieira took over at New York in 2016, and he led the team into the semi-finals of the conference play-offs in his debut term, where they eventually lost to Toronto FC. In 2017, they fell at the same stage to Columbus Crew.
At the time of his departure, NYCFC sit in second place in the Eastern Conference in MLS, just two points behind leaders Atlanta United.
These figures from OptaJack sum up how good a job the former midfielder did during his time in New York:
The move will see Vieira take charge of a European club for the first time, and a prestigious outfit such as Nice will mean more focus is on him.
European football journalist Andy Brassell believes the potential is there for the Ligue 1 team to perform well under his guidance:
Nice qualified for the UEFA Champions League under Favre at the end of the 2016-17 season, although they failed to replicate those heights last year as they finished in eighth spot.
There are some talented players in the squad, but Vieira may have some key men to replace this summer. Star midfielder Jean Michael Seri and last season's top goalscorer, Mario Balotelli, whose contract with the club expires this summer, are players whose future the new boss will seek to resolve.