Williams, who had come into the Australian Open in good form having won her first title the preceding week since becoming a mother, lost 6-4, 6-7, 7-5 to the 27th seed.
Wang said: “I always dream about him. I think he can see how I played today. He will be proud of me. I miss him.”
Williams had been on course for a last-16 encounter against her close friend Caroline Wozniacki but the former world No1 was also knocked out in a result which ended her career - the Dane had announced before Melbourne that she was retiring from the sport at the age of 29.
Wozniacki was the subject of an emotional on-court presentation with her husband, her parents and her brother following a 7-5, 3-6, 7-5 loss to Ons Jabeur, the Tunisian who had previously knocked out Britain’s Johanna Konta in the tournament.
Following the end of her career, she said: “It’s been a great ride. It is fitting my last match would be a three-setter, a grinder, and I’d finish my career with a forehand error - those are the things I have been working on my whole career. I guess it wasn’t meant to be.”
Wozniacki first climbed to world No1 back in 2010 and spent some 71 weeks of her career in the top spot. But despite 30 tour titles, she regularly struggled at the Grand Slams before finally breaking her duck at Melbourne back in 2018.
Williams was among those to lead the tributes to Wozniacki. The American said: “She’s had an amazing career. I’m going to miss her. She’s one of my best friends in the world and we’ll have a great life for the rest of our lives together. But I will miss her out on tour.”