The Welsh Rugby Union were keen for Williams to enjoy a fitting final hoorah on home soil, with Williams ready to sign off in style when the Wallabies come to Cardiff in a fortnight's time.
"You know in your heart when it's time to finish and this is that moment for me," said Williams, who was a Lion in New Zealand in 2005 and South Africa in 2009 and was named IRB Player of the Year in 2008.
"It's my definite decision. There will be nothing better and it will be a fantastic way to go out, although there will be mixed emotions.
"It will be a fantastic day playing at home in front of our own fans and against one of the best teams in the world knowing all our friends and family will be there to share the special day.
"It's going to be emotional and I will have to cope with everything that goes with it. It will be sad knowing I won't be playing international rugby anymore."
Williams, who made his Wales debut back in 2000, admits the thought of losing his place in the Welsh side is even more daunting than announcing his retirement, hence the reason behind finishing when he believes the time is right.
But while he won't be pulling on a red shirt beyond next month, he has no intention of hanging up his boots altogether having signed a new two-year contract with the Ospreys in April.
"Going out on my own terms is very important," added Williams.
"Having enjoyed such a wonderful career with great memories I would be gutted if I got dropped and wasn't picked again. I would rather retire than be retired.
"I'd like to play for Wales until I was 50 but I know that's nor possible. But when I finish with Wales I can be one of the mad Taffs like everyone else.
"I'm confident that in the season-and-a-half I have left with the Ospreys I can give them my 100-per-cent commitment. If the region believe the young players coming through are playing better than me I won't throw my toys out of the pram.
"I feel I have the legs for the next 18 months. I'm feeling good, although I feel the bumps and bruises a bit more these days. I'm still enjoying my rugby and the fitness tests results are still going well.
"I don't believe I'm over the hill and have to retire from international rugby - I just feel there's a time and place for everything. It's nice to retire when you're near the top rather than falling down the hill."