Playing in gusty winds, the Romanian beat the world number 50 6-4 6-7 (5-7) 6-3 in two hours and 23 minutes.
'I don't remember such difficult wind and to feel that tough to play a game,' Halep said.
She will face Naomi Osaka next after the Japanese world number 44 stunned Karolina Pliskova 6-2 6-3.
Osaka won 92% of points on her first serve and won the final four games to beat former world number one Pliskova in one hour and 20 minutes.
The victory was Osaka's first over a top-five player in 2018 - the 20-year-old has already beaten Maria Sharapova and Poland's Agnieszka Radwanska in California.
However, Osaka has not beaten Halep in three attempts, with Halep claiming a 6-3 6-2 in their last meeting at the Australian Open in January.