34-year-old Williams has signed a two-year deal with the Canada-based Toronto Wolfpack rugby league club which plays in the UK Super League competition.
"I have been privileged and blessed to have been given so many opportunities in New Zealand rugby, starting with Canterbury back in 2010, as well as the Crusaders and Chiefs, Counties Manukau and, of course, the Blues and All Blacks. I'd like to thank all those fans in New Zealand and around the world who have supported me," Williams said.
"I've also appreciated the support of many people at NZR, particularly the Chairman Brent Impey and Head of Professional Rugby Chris Lendrum. Brent is a thoughtful person who I've enjoyed talking to about issues affecting our game, while Chris has been awesome to deal with over the years, has always been fair with me, and I've always been grateful for his support.
"I'd also like to thank everyone involved in the All Blacks family. I never dreamed that I'd play in the black jersey for ten years playing alongside some of the legends of the game, and I'm grateful for the support of so many people in helping me grow as a footy player over that time.
"Finally, to the players I've been privileged enough to play with. I've enjoyed every moment being with the brothers and that will be the biggest thing I will miss: the camaraderie and fun with my fellow players and being privileged to suit up with them and go out and do what we love. It's been a pleasure.
"Alhamdulillah, I have been blessed."
Williams is a double Rugby World Cup winner, Olympian, dual rugby and rugby league international and New Zealand boxing champion. After a successful rugby league career and rugby stint in France, he made his rugby debut for Canterbury in 2010 and earned his first All Blacks cap later that year against England.
He was part of the All Blacks RWC-winning teams in 2011 and 2015, played his 50th Test in the third Bledisloe Cup game in Japan last year and finished his All Blacks career at RWC2019 with 58 Tests. In 2016, Williams joined the All Blacks Sevens team for the Rio Olympics.
Williams previously played Investec Super Rugby with the Crusaders and Chiefs and joined the Blues in 2017 where he took on a leadership role. A proud Muslim, that leadership extended off the field when he supported his community after the Christchurch terror attacks in March this year. He was also an ambassador for NZR's community rugby programme, NZR's ACC partnership and also worked with UNICEF.
NZR Head of Professional Rugby Chris Lendrum said: "This is an exciting time for Sonny and his family, and we're delighted for them.
"Throughout his time with NZR, he's been an outstanding individual to work alongside. In all our dealings over the years, Sonny and his manager Koder Nasser have always been fully transparent and operated with the greatest integrity."
Lendrum added: "Sonny has been a leader for other players and New Zealanders, demonstrating how a high public profile can generate good through promoting positive messages and highlighting social issues. He has also demonstrated a remarkable ability to express deep compassion and generosity for people in need.
"We thank Sonny for his service to rugby and the community, and we wish him and his family the very best for their next adventure."
Sonny Bill Williams
Born: 3 August 1985 in Auckland
Physical: 1.91m, 108kg
Position: Second five-eighth
Provinces: Canterbury, Counties Manukau
Investec Super Rugby teams: Crusaders, Chiefs, Blues
All Blacks Debut: 6 November 2010, vs England in London, aged 25.
All Blacks Tests: 58 (42 starts)
All Blacks Test Points: 65pts (13 tries)
All Black Number: 1108