The No.8-seeded Wozniacki had to use all of her guile and lift her game on just about every big point there was but she managed it, rallying from 5-3 down to win a marathon 65-minute first set then taking a simpler second set to move past a No.10-seeded Nadia Petrova in a tight two-setter, 76(3) 63.
It was redemption in a way - though Wozniacki had won four of their six previous meetings, their last one was a somewhat forgettable memory, as Petrova handed her a 62 61 loss in Sofia last November.
"Last time I lost to her I think it was 1 and 2 or 2 and 1, but the score doesn't really justify the match, because I thought it was a really close match," Wozniacki commented. "Today I was returning way better and I got a lot of returns in. We had a lot of rallies, but I felt like I was on top of most of them.
"It was pretty obvious I wasn't feeling that well - my ankle was bothering me, it's been bothering me for a while, and it hasn't really been getting better," Azarenka said after the match. "But on the bright side, I won the match today. I overcame those things and - I don't know how - managed to just take my opportunities and really go for my shots and make it happen, and not just wait for her mistakes.
"She's a very, very consistent player and doesn't miss, so I had to take everything in my own hands."
And on the 17-match winning streak? "I never think about winning streaks," she said. "I have big self-belief. I just know the things I have to do. Sometimes it will not work out. But if I have good intentions, a good mindset and know exactly what to do on the court, the outcome is not that important for me."
Wozniacki leads Azarenka in their head-to-head, 4-2, though there's a very big asterisk - they haven't played in two years, since this same round at this tournament in 2011, long before Azarenka won her first Grand Slam title and got to No.1 - in fact even before the Belarusian cracked the Top 5.
"Victoria has improved in a few ways that have helped her a lot," Wozniacki said. "I think I'm playing well. She's obviously playing well. I'm looking forward to playing her again. We'll see what happens.
"I definitely need to bring my A-game."
"Not that our games have changed tremendously, but in these two years a lot of things happened - a lot," Azarenka said. "But I think she's a terrific player. She knows how to play big matches and she knows to bring the A-game when it's needed. It will definitely be an interesting challenge."
Azarenka was asked how much better she is now than here two years ago. "Maybe 50%," she said.
The other quarterfinal on the top half of the draw will feature No.4 seed Angelique Kerber against No.7 seed Samantha Stosur, after Stosur rallied from a set down to beat No.24 seed Mona Barthel, 46 62 63, and Kerber edged Spanish qualifier Garbiñe Muguruza in a tight two-setter at night, 64 75.
Stosur has beaten Kerber in both previous meetings, most famously in the 2011 US Open semifinals.