The club announced on Tuesday that Villa, who is Spain's all-time record goalscorer, will officially leave when his contract expires on 31 December having spent four seasons with the club he joined from from Atletico Madrid in 2014.
A club statement read: "Bringing the curtain down on an incredible four years with New York City Football Club, David Villa will leave NYCFC at the end of his contract on December 31, 2018."
"I can only say thank you, thank you to everybody," he told New York's website. "First, to City Football Group that gave me the opportunity to come here.
"To NYCFC and MLS for accepting me. To everybody at the club who helped me day by day.
"Thank you to the people in the offices, the people working with the team and the coaches and staff.
"Thank you to my teammates -- without them it would have been impossible to be successful. Thank you to the people working in the media that always gave me the respect and the love."