It was a red-letter occasion for Williams three months short of his 35th birthday as he led the team out to an inevitable standing ovation and wore a specially-commissioned shirt with the word "Diolch" - Welsh for thank you - emblazoned across his chest.
The tearful Ospreys star's last Wales appearance - his 87th - produced a trademark try with his final act in the red shirt to send a 62,000 Millennium Stadium crowd wild, but Australia had already done enough for victory.
Second-half tries by scrum-half Will Genia and wing Lachie Turner - scored in quick succession after Wales full-back Leigh Halfpenny had been sin-binned for tackling James O'Connor without the ball - were followed by a Berrick Barnes touchdown.
The damage was inflicted during a ruthless 12-minute spell when Australia erased all hope of Wales avenging their World Cup bronze medal match defeat in Auckland just 43 days ago.
O'Connor kicked three conversions and a penalty, while Wales could only muster tries from Williams and Rhys Priestland, two Priestland penalties and a Dan Biggar conversion.
In 16 games against Australia, New Zealand or South Africa since coach Warren Gatland took charge three years ago, Wales have claimed a solitary success.
And in 46 Tests during rugby union's 16-year professional era, the Tri Nations heavyweights have now claimed a combined total of 42 wins against Wales, drawing one and losing just three.
They are statistics that will continue to haunt Gatland as Wales begin building towards the 2015 World Cup, although next on their agenda is a concerted tilt at Six Nations silverware.
Williams will no longer be part of Gatland's plans, and even though Wales could not give him the winning send-off today's script demanded, he can bow out as a true Welsh rugby legend in the company of yesteryear superstars like Gareth Edwards, Barry John and Gerald Davies.
Wales showed six changes from the side beaten by Australia at the World Cup, some of them enforced as injuries sidelined locks Alun-Wyn Jones and Luke Charteris, prop Adam Jones and centre Jonathan Davies, while French club commitments accounted for half-backs James Hook and Mike Phillips.
Cardiff Blues prop Scott Andrews made his first Test start and Ospreys lock Ian Evans returned following an injury-ravaged three years out of international rugby, but Australia also had some notable absentees in star World Cup backs Kurtley Beale and Quade Cooper.
A minute's silence, which broke into spontaneous applause, was held before kick-off in memory of the late Wales football manager Gary Speed, and the opening exchanges proved low key.
It took 13 minutes for Williams to receive his first pass, but it was of such poor quality from centre Scott Williams that it rolled along the floor and the celebrated wing knocked on.
Priestland had already kicked Wales ahead through a 45-metre penalty, but Australia had their moments and were unlucky not to strike after Priestland saw his attempted defensive clearance charged down by opposite number O'Connor.
Wales escaped on that occasion, and they enjoyed another reprieve when O'Connor sent an angled penalty chance wide from 25 metres eight minutes before half-time.
Australia, though, continued to press and they looked to have finally breached Wales' well-organised defence courtesy of Barnes' cross-kick aimed towards Turner.
Turner grounded the ball over Wales' line, but a last-ditch Shane Williams tackle nudged him into touch a split second beforehand, and Wales regrouped for Priestland to kick his second penalty.
O'Connor cut the deficit with the final scoring act of a disjointed opening period, although Wales probably just about deserved their 6-3 advantage.
Wallabies coach Robbie Deans made an interval change, taking off openside flanker David Pocock and replacing him with Radike Samo, and there was a greater urgency about Australia's approach.
Halfpenny's yellow card then played right into their hands, and he had hardly left the field before Genia sniped his way over from close range for a try that O'Connor converted.
It was rough justice on Wales, but they had to regroup quickly, and they were helped when O'Connor hit the post from close range with a penalty that would have extended Australia's lead.
But the Wallabies had momentum, and with Halfpenny still off, a slick handing move ended in Turner sprinting over wide out and O'Connor booted the touchline conversion.
Barnes then ended the game as a contest, and although Priestland touched down 13 minutes from time before Williams crossed during the closing seconds, Wales had crucially conceded 21 second half points.
Gilbert has released a new line of rugby cleats. The Gilbert Virtuo 8S is part of the exciting new product. Check it out.
The entire All Blacks apparel line has been updated for 2013/14. Check out the New Zealand All Blacks polo.
The Nike Tiempo is a solid rugby cleat and one of few styles still made from full-grain natural leather.
The Gilbert Blitz 8S rugby cleat is a great cleat at a great price of $69.99. Get a new pair of cleats today.
A cool looking all black rugby cleat with the high performance adidas is known for. Get in the Gear!
Wear the crest of the British and Irish Lions on your t-shirt. A great look for the summer.
The All Blacks Performance t-shirt is black with hints of blue from the training jersey. Very Cool.
The New Zealand All Blacks training jersey for 2013/14. Get in the Gear!
The USA Rugby Pro Alternate rugby jersey is perfect for any fan of the Eagles. Get yours to wear during the summer Test matches.
The NEW All Blacks 2013/14 jersey has arrived at World Rugby Shop. Dare to wear the colors of the All Blacks.