The American six-time champion won a gripping contest 6-2 4-6 6-3 in the Flushing Meadows night session to close in on a 23rd Grand Slam singles title.
Williams, 34, will play Czech 10th seed Karolina Pliskova in the semi-finals at Flushing Meadows (00:00 BST, Friday).
They will be followed by Angelique Kerber against Caroline Wozniacki.
Williams and Kerber are battling for the world number one ranking, with the American knowing that, to hang on to top spot, she must reach the final.
Should the German second seed line up as her opponent on Saturday, Williams will have to beat her to stay on top.
It took the best part of two hours for Williams to break free of the tenacious Halep with a succession of heavy returns giving her a 3-1 lead in the final set.
Williams dominated the first set with six aces and three breaks of serve,
But Halep, who became the first woman at this year's US Open to break the American's serve, claimed the second.
The 24-year-old Romanian fought off 12 break points and converted her fifth set point of an epic 10th game to draw level.
A huge shock loomed when she stood at 15-40 early in the second set, but Williams won three straight games to build a lead she would not relinquish.
"I lost my rhythm a little in the second set and Simona kept playing really well, going for her shots," said Williams.
"But I knew if I wanted to win this I needed to step it up in the third set."
Pliskova, 24, beat Croatian teenager Ana Konjuh 6-2 6-2 to reach the last four of a Grand Slam for the first time.
She did not face a break point and dropped only five points on her serve as she swept past the 18-year-old in just 57 minutes.
"I am so excited to be in my first semi-final, especially in this tournament," said Pliskova. "I very much love New York and the hard-court season."
Serena Williams was pushed hard by fifth seed Simona Halep before coming through in three sets to reach the semi-finals of the US Open.