The Greek prevailed 6-7 (2) 7-6 (6) 6-3 after a gruelling three-hour, 30-minute battle at Flushing Meadows on Tuesday morning that ended at 2.13am local time.
Andreescu, the 2019 champion, had been on a 10-match winning streak after returning to form following a series of problems with injury and illness.
The Canadian took the first set despite a number of unforced errors but Sakkari responded to edge a second set notable for four consecutive breaks of serve.
A new record for the latest women’s singles finish at the US Open was then set as the match stretched on and it was Sakkari who triumphed after Andreescu received treatment for a leg problem.
After failing to serve out the opening set, the Swiss 11th seed came out on top of a 26-point tie-break and maintained her record of not having dropped a set all tournament with a 7-6 (12) 6-3 victory.
“It was very important the first set,” said Bencic. “It’s mentally important because when you lose a set like this, it’s very frustrating. A little bit bitter.
“Then I started to focus on the next set and tried to go up again quickly, so I put pressure on her again.”
Flushing Meadows has been Bencic’s most successful grand slam venue and this is the third time she has reached the last eight, with her best result a semi-final run two years ago.
She said: “I was 17 when I made my first quarter-final, so that also kind of gave me this idea. I definitely feel like it’s just adding to the experiences.
“Now I’m definitely learning how it is to be in the second week, how to manage these quarter-finals, semi-finals. I also feel the Olympics helped me a lot in this.
“I played big matches there, as well, and I kind of know now how it feels to go deep in a tournament, and an important tournament. It definitely feels good.”
Swiatek is the only woman to reach at least the fourth round at each slam this year but the French Open is the only tournament where she has gone further.
The Pole, who admitted to struggling with the pressure of expectation earlier in the tournament, said: “For sure it was really tough but she plays great tennis right now.
“So I’m pretty happy with my performance, because I came back in the first set and it was pretty hard to use the chances that I had and win the set balls because she was playing just great.
“I’m just mad a little bit that I didn’t come back in the second set and I drifted away a little bit.”
Fourth seed Karolina Pliskova stepped up when it mattered to defeat Anastasia Pavlyuchenkova 7-5 6-4 and also advance to the last eight.
The 2016 finalist was pushed by her Russian opponent, a surprise finalist at this year’s French Open, and had to fight back from an early break down in the second set to secure victory.
Pliskova admitted: “I thought there were too many mistakes. I didn’t feel good at all, but somehow I managed to find a way to play a bit better than she did.
“I think it’s two or three years since I was in the quarters. My last few years were not great so I think it’s a really good success that after the Wimbledon final I have another chance to go pretty far here.”