Williams had been hoping to take an outright lead in overall Grand Slam titles with 24, but fell agonisingly short in a three-set epic on Rod Laver Arena.
The Chinese player's form deserted her as she served for the match at 5-4, allowing Williams to break back with a superb forehand victor at the end of a 24-shot rally.
Wozniacki held serve once to stay in the match but on the second occasion she went behind and an ill-judged HawkEye challenge set up a match point.
She breezed through the field to reach her first final since return but played an uncharacteristically error-strewn match to go down to Angelique Kerber, 6-3, 6-3.
The Dane announced last month that the scene of her greatest triumph, when she broke her grand slam duck in 2018, would also be the stage for her professional farewell at the age of 29.
Williams' defeat came just minutes after her close friend Caroline Wozniacki was knocked out by Tunisia's Ons Jabeur, bringing a tearful end to the former world number one's final tournament before retiring.
The Chinese star's best Grand Slam result to date was a run to the quarterfinals of the US Open a year ago - where she was crushed by Williams 6-1 6-0 - but she will fancy her chances of at least matching that when she takes on the unseeded Ons Jabeur of Tunisia in the next round. For the entire match, Yoshihito took four innings of his opponent and never lost his.
Celebrities have nothing but praise for Jennifer Aniston's 'morning after' post
On Sunday, Pitt, 56, and Aniston, 50, sent fans into a tizzy after the former couple embraced backstage at the SAG Awards . The camera quickly panned to Aniston who was spotted laughing in the crowd.
The three-time main semifinalist Grigor Dimitrov suffered a defeat by 6-4, 7-6 (7-6), 3-6, 6-7 (3-7), 7-6 (10-3) against the American of 22 years.
Nadal had little problems in his straight-sets win against Bolivia's Hugo Dellien.
Australian Open 2019, she lost to Karolina Pliskova to crash out in the quarter-finals 6-4, 4-6, 7-5.
"Definitely one of the best serving matches I've had lately, inspired by my coach Goran Ivanisevic", Djokovic said.
Serena Williams has been sent packing in the third round of the Australian Open.
Djokovic is seeking to become only the third man to win eight or more titles at the same Grand Slam after Rafael Nadal (12 at Roland Garros) and Roger Federer (eight at Wimbledon).
"I don't know if any Bolivian might have played against a world No. 1, and on top of that at a grand slam", Dellien had said before the game.