French Open runner-up Halep, the top-seeded woman on the Washington hardcourts, outlasted Colombia's Mariana Duque-Marino.
French Open runner-up Halep, the top-seeded woman on the Washington hardcourts, outlasted Colombia's Mariana Duque-Marino 3-6, 6-4, 6-2 in withering heat she measured at 47 Celsius (116 F) on the court.
"It was really hot out there," Halep said. "I was a little bit dead on the court. It was the same thing for her so I said I have to keep fighting even if I'm struggling."
World number 102 Petkovic, a former top-10 player and French Open semi-finalist on the comeback trail, ousted 73rd-ranked Bouchard 6-2, 4-6, 6-0.
"I feel like a lot of pieces are falling into place for me this year," Petkovic said. "I feel like I can do more damage this year. I feel like I have the best tennis inside me and I'm taking steps to bring it out."
She compared adding an agent, mental coach and physio-therapist to her entourage with a music band making an unusual album.
"You know those bands that have an album and you don't understand what it was but you have to go through it to get to the next one, that's what this year feels like," Petkovic said. "This is my transition year for me, my in-between album that nobody will remember."
Petkovic advanced to a quarter-final against 17-year-old Canadian Bianca Andreescu, who won her first WTA main draw matches this week, including Thursday's 6-2, 6-3 triumph over French second seed Kristina Mladenovic.
Austrian top seed Dominic Thiem was set to face South African Kevin Anderson, who has won all five of their prior meetings, and Japanese second seed Kei Nishikori was to play fellow former Washington champion Juan Martin Del Potro in later men's matches.
Halep dropped the first set in 28 minutes, losing her serve in the second game and never forcing a break point against her South American foe.
"I was able to keep fighting," Halep said. "I calmed down a little bit and was able to get my shots in more and I think that was the key to the match, to push back on her."
The 25-year-old Romanian battled back and booked a last-eight date with Russian seventh seed Ekaterina Makarova. Halep is 3-1 all-time against Makarova, losing only in a 2015 Australian Open quarter-final.
"Makarova will be tough because she's a lefty, but I've played her a couple of times. And hopefully it won't be as hot."
Another Friday quarter-final will send German fourth seed Julia Goerges against Romanian sixth seed Monica niculescu, who eliminated compatriot Patricia Maria Tig 6-4, 7-6 (7/2).