Williams blazed through the first set in just 20 minutes but had to fight tooth and nail on Rod Laver Arena to put away the valiant Halep, prevailing 6-1 4-6 6-4 to book a quarter-final clash with Czech seventh seed Karolina Pliskova.
The victory, just 16 months after giving birth to daughter Olympia, secures an astonishing 50th grand slam quarter-final appearance for the 37-year-old American.
Having dropped a miserly nine games on her path to the fourth round, Williams raced through the opening set and looked primed to make short work of her Romanian opponent.
Halep lifted in the second set, working Williams around the court and roaring and pumping her fists after fighting back to even the ledger.
But even Halep’s supreme defensive game wasn’t enough to stop Williams, who managed to find another gear after saving three break points down 3-2 in the deciding set.
“I really needed to elevate my game,” Williams said.
“She’s the number one player in the world and there’s a reason why … in order to stay out there I had to play a little bit like I knew I could.
“I am just a fighter, you know I just never give up. It’s definitely something that’s innate. I just work so hard for every point.”
The defeat leaves Halep at risk of losing her No.1 ranking with Japan’s Naomi Osaka among four rivals who could ascend the summit depending on their remaining results.
In the men’s draw world number one Novak Djokovic has edged closer to a seventh Australian Open title
Djokovic survived a survived a taxing fourth-round clash with rising star Daniil Medvedev.
In a grinding encounter on Rod Laver Arena that stretched into the early hours of Tuesday morning, Djokovic outlasted his 22-year-old opponent to claim a hard- fought 6-4 6-7 (5-7) 6-2 6-3 victory in three hours and 15 minutes.