The reigning Roland Garros holder will play Ana Ivanovic after the Serb ninth seed defeated Ukrainian teenager Elina Svitolina 6-2, 6-3 in less than an hour on Friday night.
Sharapova, a five-time Grand Slam champion, has won eight of 11 meetings with her former world number one opponent. Ivanovic claimed their last meeting in the third round at Rome in May.
Sharapova had to make a great escape against world number two Halep, who has burst into WTA prominence over the past year. Sharapova won her fifth match against Halep without a loss.
The Russian, who tends to play well under pressure, recovered after a tight opening set to finally secure the victory -- her 38th of 2014 -- after two and a half hours.
More From This Section
"It was a pretty poor first set from my end, a lot of unforced errors," said Sharapova. "I think it was some of the lowest first serve percentages I've had for a while.
"Nothing really was going my way. So I definitely needed to do a few things differently to be a bit more consistent but maintain that aggressiveness that works against her.