Andrew Bogut added 16 points with nine rebounds and four assists while Joe Ingles scored 15 and seven assists in front of 52,079 fans in Melbourne -- the biggest ever crowd to watch a game of hoops in Australia.
Boston's Kemba Walker led USA with 22 points off the bench, but it wasn't enough to prevent a rare defeat for Gregg Popovich's world number one team in a massive wake-up call ahead of the World Cup in China, which tips off on August 31.
"The support has been amazing. We're very proud to represent these fans and in the right way. We're doing it as a team, as a group," said veteran Mills, who was electric in the fourth quarter.
"This is a building block for us, we are just taking it step-by-step. It's just nice to see our progress."
Popovich's squad lacks a host of top NBA stars with the likes of LeBron James, James Harden, Anthony Davis and Kawhi Leonard all opting out of the World Cup.
But it still boasts plenty of young talent and they comfortably beat Australia 102-86 in a warm-up game on Thursday, on the back of a 90-81 victory over second-ranked Spain in California this month.
"We need to congratulate the Boomers, they were really great tonight," said Popovich, who referred to Mills, who he coaches at the Spurs, as "a pain in the arse".
"We looked discombobulated at times, made some poor decisions," he added of his team, who gave up a 10-point third-quarter lead.
"Some of it is expected with a new group, trying to learn new systems so it's not surprising. But the Aussies gave us a great lesson in far as where you want to be and how you want to play in this type of competition. We're getting used to that and hopefully learning."
Skipper Walker explained the loss by saying: "They wanted it more than us tonight. Lesson learned."
- Traded buckets -
The USA tinkered with their line-up, with only two starters from the first game -- Donovan Mitchell and Myles Turner. Los Angeles Lakers' Kyle Kuzma was ruled out with a sore ankle.
In contrast, Australia stuck with the same experienced five, led by Mills, Bogut, Ingles, Aron Baynes and Jock Landale.
The five-time world champion Americans hit their first points within 20 seconds and with good offence and finishing hung on to the lead, ending the first quarter with a 26-23 advantage.
But quick points at the re-start from veteran Bogut drew Australia level and in a seesawing second quarter they traded buckets before a late two-pointer from San Antonio Spurs' Derrick White gave the visitors a 49-48 first-half lead.
As they did in their match on Thursday, the USA lifted in the third quarter and raced 10 points clear.
But back-to-back threes from Mills closed the gap and two late free throws from Chris Goulding remarkably sent the Boomers into the final quarter with a 78-76 lead.
With the record crowd roaring them on, Australia took control as the clock ticked down to close an epic victory in their final game before heading to China.
Team USA have one more warm-up left, against Canada in Sydney on Monday.