Sportal.co.nz 24.May.2013Getty Images
He took to YouTube to announce his decision.
"I'm hanging up the black jersey, it's been an amazing 10 years but it's time to call it quits," he said.
Williams was part of the All Blacks training camp in Mt Maunganui earlier in the week.
He will continue to lead the Blues in Super Rugby for the remainder of the year.
The 32-year-old World Cup winner in 2011 played 77 Tests since making his All Blacks debut in 2002 and was part of the New Zealand World Cup sides in 2003 and 2007.
Selected for Auckland in 2001, he made the Blues side for the next year and was then included in the All Blacks touring team to Britain at the end of 2002 and made his Test debut against England on that tour.
He almost missed the 2003 World Cup after a pin had to be inserted in his foot after he suffered a stress fracture at a pre-Cup training camp. However, he was included and while missing the first two games he played in the remainder of New Zealand's ill-fated campaign.
Williams had to convince the new All Blacks coach in 2004, Graham Henry that he was worth a place in the side and he missed five Tests but made the end of the season tour.
His 2005 season did not get off to an auspicious start when he was banned for six weeks for stomping on Richie McCaw in a Super 12 game. But by the start of the international season he was included in the side and it was against the British and Irish Lions that he produced what is generally regarded as the finest form of his career. He demonstrated that with a superb lineout performance in the first Test in which he claimed the All Blacks' first try when taking a Lions lineout throw and driving through to score.
Issues at the Blues in the 2007 season resulted in Williams transferring to the Crusaders.
When he returned to Auckland in 2009 he suffered crippling Achilles tendon injuries which denied him almost two years of rugby. However, he was back in time for the 2011 Rugby World Cup.