Azarenka back in Australian Open quarters after seven-year wait
Azarenka, twice a winner of the title in Melbourne, started slowly and lost the opening set but stormed through the second to take the fourth round match into a decider.
Neither player could hold serve in the third set but Azarenka's greater experience finally pulled her through.
The Belarusian wobbled when serving for the match at 5-4 but hit back from 15-40 to complete the victory at 2.15am local time with an angled crosscourt backhand winner.
Azarenka will face third-seeded American Jessica Pegula for a place in the semi-finals.
"I feel so relieved, it was complete pressure, lots of momentum shifts, there was everything in this match," 24th seed Azarenka said on a sparsely-populated Rod Laver Arena.
"Happy I could handle everything and take my chances and went for it. I've had a couple of close matches this year that didn't go my way so I'm really proud of myself."
Looking ahead to her quarter-final she said it would be a more familiar opponent, having known liitle about Zhu Lin.
"I've practised a lot with Jess and I'm going to enjoy that one. If I do lose I would rather lose to Jess, but I'm going to give her hell!"