The 33-year-old, who is currently with French side Toulon having joined them at the beginning of last season, confirmed his retirement decision overnight.
Williams walks away from France with winner's medals from the 2014 French Top 14 and European Cup.
"I just feel internally that it's right, that my head is in a good place to walk away from the game," Williams said.
"I also feel that my body is saying, 'no more please'. My knees are no good, and shoulders, and I don't want to be 60, or 40, and not be able to walk around and play with my daughter in the backyard."
Ali Williams won two Super Rugby titles, one each with the Blues and Crusaders and was part of the 2011 Rugby World Cup side before heading to France in 2013.
"I'm just grateful for the opportunities I've had in New Zealand, the people I have met, the fun I have had, and then now here in France. The club said they wouldn't mind me going around again but nah, I'll give it a miss."
The lock is the third high-profile player to announce their retirement from rugby at Toulon in the past year, with England's Jonny Wilkinson and South Africa's Danie Rossouw having also quit the sport.
Toulon's captain and Williams' former All Black teammate Carl Hayman has already said he will also retire at the end of the season.
Williams has vowed to spend his retirement fishing and hunting.