The 35-year-old wing has signed for the Mitsubishi Dynaboars in Division Two of the Japanese League on a one-year deal.
Williams scored twice in his final competitive game as Ospreys .
"It was a last-minute offer that I had to give great thought to in a short space of time," Williams told Twitter.
"Really looking forward to this exciting venture."
Williams announced his  in February after he turned down Ospreys' offer to extend his playing career with the Welsh region to a 10th season.
The 2008 International Rugby Board player of the year  in December, with 58 tries in 87 games for his country and two in four Tests for the British and Irish Lions.
Williams signed off from the international stage in typical fashion, scoring a last-gasp try in the  in Cardiff on 3 December.
The double-Grand Slam winner was also Ospreys' record try-scorer, with 57 touchdowns in 141 matches, and scored late on in his last game for both club and country.
But Williams' final appearance in Europe was for the Barbarians in their  in Cardiff on 2 June.
He was expected to continue his association with the Ospreys next season by  with the Liberty Stadium club but the Welsh region have released him for this "once in a lifetime" opportunity.
An Ospreys statement said: "Taking into account his fantastic service to the Ospreys, we understand that this is a once in a lifetime opportunity for Shane and his family to experience a new culture and life in a new country and will not stand in his way.
"We wish them the best of luck in Japan and look forward to welcoming Shane back to Ospreylia upon completion of his playing commitments, when he will continue to represent the region with distinction off the field."
Williams is second in international rugby's all-time try-scoring list behind Australian wing David Campese.
And the legendary wing follows former Ospreys team-mates Jerry Collins and Filo Tiatia, who joined Yamaha Jubilo and Toyota Verblitz respectively in 2011, to Japan.
Wales' record international try-scorer Shane Williams has completed a U-turn on his rugby retirement and will play for a Japanese side next season.