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.

Almost completely cut off for centuries, it has tried to let in some aspects of the outside world while fiercely guarding its ancient traditions.
The Bhutanese name for Bhutan, Druk Yul, means "Land of the Thunder Dragon" and it only began to open up to outsiders in the 1970s.
The Wangchuck hereditary monarchy has wielded power since 1907. But Bhutan became a two-party parliamentary democracy after elections in March 2008.
Population 750,000
Area 38,364 sq km (14,812 sq miles)
Major language Dzongkha
Major religions Buddhism (official), Hinduism
Life expectancy 66 years (men), 70 years (women)
Currency ngultrum
Head of state: King Jigme Khesar Namgyel Wangchuck
Jigme Khesar Namgyel Wangchuck succeeded his father, Jigme Singye Wangchuck, in December 2006 after the former monarch announced his abdication.
His predecessor had already given up some of his absolute powers in 1998 and ruled in conjunction with the government, an assembly and a royal advisory council.
Prime Minister: Tshering Tobgay
Tshering Tobgay was elected Bhutan's second prime minister in July 2013, succeeding Jigme Yozer Thinley.
He is president of the People's Democratic Party. He was leader of the opposition in the National Assembly from March 2008 to April 2013. He has projected himself as a reformer, rejecting official limousine and prime ministerial accommodation.
Television did not come to Bhutan until 1999. For years, the country cut itself off, fearing that outside influences would undermine its monarchy and culture.
Radio broadcasting began in 1973 and the internet arrived in 1999.
Some key dates in the history of Bhutan:
1720 - Chinese imperial army invades and temporarily establishes control over Bhutan.
1772-73 - British intervention.
1864-65 - Further intervention by Britain.
1907 - Ugyen Wangchuck is chosen as hereditary ruler.
1910 - Treaty giving Britain control over foreign relations.
1949 - Treaty signed with newly-independent India guaranteeing non-interference in Bhutan's internal affairs, but allowing Delhi influence over foreign relations.
1958 - Slavery abolished.
1974 - First foreign tourists allowed in.
1990 - Thousands of Hindus flee to Nepal following clashes.
1998 - King cedes some powers to national assembly.
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.
[NEXT_CONCEPT]
Bhutan is a tiny and remote kingdom nestling in the Himalayas between its powerful neighbours, India and China.