The victor will play Novak Djokovic, who easily accounted Joao Sousa of Portugal 6-3, 6-4, 6-3 earlier in the day.
It was most striking during Lesia Tsurenko's 6-7 (3), 7-5, 6-2 win against Marketa Vondrousova, in which both players seemed affected by the temperature and mugginess.
The Spaniard will be at that stage for the second time at the US Open, five years after her other run to that round.
Djokovic, the No. 6 seed in the men's draw, is 28-0 at the US Open when facing an opponent ranked outside the Top 50.
His match didn't get to the point of a heat interruption, because he wrapped it up in straight sets, but that did come into play for a couple of women's matches.
"It's a dubious call to me because he's let it happen so many times", commentators were heard saying about a late Sousa challenge call by the umpire.
'I have so much respect for Roger and everything he's done for the game and he's been a hero of mine.
He reached the quarterfinals for an 11th consecutive appearance in NY as he bids for a third US Open championship and 14th Grand Slam trophy.
Rick Zamperin: Simply put, Blue Jays whiffed on Josh Donaldson deal
Given his injury history, it makes sense that they don't want to risk him accepting that offer and sticking around. After spending parts of four big-league seasons in Oakland, Donaldson had a monster first year with the Blue Jays.
The upset for the ages looked remote when Federer broke Millman - playing his his first fourth-round match at a slam at age 29 - in the second game of the match en route to taking the opening set in routine fashion.
Kei Nishikori is into the quarterfinals of his return to the U.S. Open.
Nadal praised the 26-year-old Basilashvili, who will break into the top 30 for the first time when the next rankings are released after the tournament.
But on the very same court on which Federer destroyed Hewitt 6-0 7-6 6-0 in the 2004 US Open final, Millman stared down the greatest player of the professional era to send the world No.2 crashing to his earliest grand slam defeat in nearly four years. Suarez Navarro let the 22nd-seeded Sharapova create her own problems.
The 14th-seeded Keys will play the victor of the Carla Suarez Navarro vs. Maria Sharapova match in the night session at Arthur Ashe Stadium.
Kei Nishikori will be hoping to make another deep run at his most successful grand slam event after he outclassed Philipp Kohlschreiber 6-3 6-2 7-5 to reach the quarter-finals of the US Open on another scorchingly hot day in NY. She still and looked tired to start the second, leaning on her racket between points while falling behind 2-0.
"I felt like a deer in the headlights to begin with, to be honest", he said.
She was able to play through the pain and eventually won the match in 2 hours, 32 minutes.
However, the 37-year-old Swiss delivered a strangely lethargic performance on Arthur Ashe Stadium - prompting some pundits to question whether he was 100 per cent fit - and Millman capitalised superbly to earn the biggest win of his career by far.