Williams' performances against Danka Kovinic and Anett Kontaveit had given hope to the tens of thousands who flocked to Flushing Meadows hoping her swansong could have a fairytale ending.
But, despite a memorable second-set fightback in a raucous atmosphere, there will be no record-equalling 24th grand slam singles title, with Williams succumbing to a 7-5 6-7 (4) 6-1 loss.
The 40-year-old, who played her first professional tennis match back in 1995, walked calmly to the net after missing a final forehand before waving to all sides of Arthur Ashe Stadium while 'Simply The Best' played over the loudspeakers.
Addressing the crowd through tears, Williams said: "Thank you so much, you guys were amazing. I tried. Thank you daddy, I know you're watching. Thanks mom.
"I just thank everyone that's here, that's been on my side for so many years, literally decades, But it all started with my parents and they deserve everything so I'm really grateful for them. And I wouldn't be Serena if there wasn't Venus, so thank you Venus. It's been a fun ride."
Williams revealed earlier this month that, a few weeks short of her 41st birthday, she had decided the time was right to step away.
It was fitting it came at the US Open, the scene of her first grand slam singles title 23 years ago as well as her most controversial moments and where she has ultimately been embraced as America's greatest tennis star.
Having been unsure whether to give her career one last go this summer, she was surely left in no doubt that it was the right decision.
"This week has been really great," she said. "Just so much support, so much love. It was really amazing and overwhelming. I am so grateful for it. The whole crowd was really wanting to push me past the line. I'm so thankful and grateful for that."
Playing her heart out until the very end
Williams again produced a tremendous level considering she has played very little tennis in the last 18 months.
She looked set to win the first set when she moved 5-3 ahead but her serve, the shot that has been her biggest weapon, was not quite working and, as she tightened up, Tomljanovic took advantage, winning four games in a row.
Williams responded brilliantly, moving 4-0 ahead in the second, but the surety that would have accompanied such a lead for most of her career is no longer there and back came Tomljanovic again.
Williams missed four set points in a long eighth game but, three points away from the end at 4-4 in the tie-break, she took a deep breath, served an ace and forced a decider.
The delirious crowd were on their feet, and Williams began the third set in perfect fashion by again breaking Tomljanovic's serve.
But, with the match approaching the three-hour mark, the physical effort Williams had put in began to take its toll and she had little more left to give.
At 5-1, Williams was given a pre-emptive standing ovation. She hung on grimly, saving five match points in vintage fashion, but with the sixth it was all over.
Serena Williams: "I'm ready to be a mom."
Having thought her career might have ended with an injury-enforced retirement at Wimbledon last year, this was definitely a far more fitting way to bow out, but one that also leaves Williams knowing she can still compete at the top of the game.
"I've come a long way since last year at Wimbledon," she said. "Making it a different moment I think is much better.
"It takes a lot of work to get here. Clearly I'm still capable. It takes a lot more than that. I'm ready to be a mom, explore a different version of Serena. Technically in the world I'm still super young, so I want to have a little bit of a life while I'm still walking."
She has been reluctant to completely shut the door on another whirl, adding with a smile in the press conference: "I always did love Australia, though."
But Williams has been open about wanting another child, as well as to spend more time with her five-year-old daughter Olympia and concentrate on her business interests.
She anticipates a role in tennis in the future, saying: "Tennis has been such a huge part of my life, I can't imagine not being involved in tennis. I don't know what that involvement is yet."
The flood of tributes from not just the sporting world but across the spectrum spoke of Williams' huge influence, which will endure for many years to come.
Asked how she wanted to be remembered, Williams said: "There's so many things. Like the fight. I'm such a fighter. I feel like I really brought something, and bring something, to tennis.
"The different looks, the fist pumps, the just-crazy intensity. Passion, I think, is a really good word. Just continuing through ups and downs. I could go on and on. But I just honestly am so grateful that I had this moment and that I'm Serena."
Tomljanovic, who will next play Liudmila Samsonova, handled herself with great dignity and described the moment as "surreal".
She said: "I'm feeling really sorry because I love Serena just as much as you guys do. What she's done for the sport of tennis is incredible. I never thought I'd have the chance to play her in her last match when I was a kid watching all those finals."