The 16th-seed, who stunned former world number one Serena Williams at the Rio Olympics, rallied from an early loss of serve in the second set to break the German twice more on her way to a fourth win against a top-10 opponent in 2016.
The 22-year-old Ukrainian will next face Australian Daria Gavrilova, who beat Caroline Garcia 6-4 6-3.
"I was just trying to be really focused on every ball, and of course try to win," Svitolina told the WTA's website (www.wtatennis.com).
"I was trying to think about my next step, what I should try to do. I tried to make my first serve and concentrated on the next shot, but still I was a little bit shaky."
Home favourite Zhang coasted to victory in just under an hour against world number five Halep, who was let down by her serve.
The Romanian hit six double faults and converted just two of her seven break point opportunities.
The unseeded Zhang, who broke through with a stunning run to the quarter-finals in this year's Australian Open, will face Britain's Johanna Konta, who battled past U.S. Open finalist Karolina Pliskova 6-1 3-6 7-6(2), for a spot in the last four.
Third seed Agnieszka Radwanska safely negotiated a tricky tie against former world number one Caroline Wozniacki, winning 6-3 6-1 to secure a quarter-final berth.
The Pole will next face either Alize Cornet or Yaroslava Shvedova, whose third-round match was postponed until Friday due to rain.
(Reporting by Nivedita Shankar in Bengaluru; Editing by John O'Brien and Toby Davis)
