Millman's 3-6, 7-5, 7-6 (9/7), 7-6 (7/3) triumph scuppered a blockbuster last-four meeting between Federer and two-time US Open champion Djokovic, who had advanced with a 6-3, 6-4, 6-3 victory over Joao Sousa.
But Federer suffered his earliest US Open exit since he fell in straight sets to Tommy Robredo in the fourth round in 2013.
It was also 20-time major winner Federer's first loss against a player outside the top 50 in 41 meetings at the US Open.
"I'm probably in a little bit of disbelief," Millman, 29, said after three hours and 35 minutes in the cauldron of Arthur Ashe Stadium.
"I have so much respect for Roger and everything he's done for the game. He's been a hero of mine."
Federer had set points in both the second and third sets, but troubles with his serve infected his entire game and 77 unforced errors doomed the 20-time Grand Slam champion in the face of a determined attack from Millman.
"It was very hot," said Federer, whose shirt and shorts were wringing wet with sweat most of the night.
"I felt I couldn't get any air and I was sweating more and more and became more and more uncomfortable.
"John dealt with it better," Federer added. "He's from Brisbane, one of the most humid places in the world!"
Millman said he was feeling the nerves of his first Grand Slam fourth round match as he surrendered the first set with a single break of serve.
"I felt like a bit of a deer in the headlights to begin with," said Millman, whose career has been slowed by a string of injuries and three surgeries.
"The feet weren't moving. Roger had it on a string, he was manipulating me around the court."
Although Federer broke first on the way to a 5-3 lead in the second, Millman won the last four games, breaking Federer twice as Federer wasted two set points in the 10th game.
Federer upped his game in a tight third set, and had the first chance to claim the set at 6-5 in the tiebreaker. He netted a service return, and Millman converted his second set point to seize a two sets to one lead.
When the Swiss great broke for a 4-2 lead in the fourth the Ashe fans were on their feet.
But he gave the break back in the next game after slamming an overhead into the bottom of the net on game point.
They went to the tiebreaker, where two of Federer's 10 double faults, followed by a backhand into the net and a wayward forehand gave Millman a 6-1 lead.
Federer, looking all of his 37 years, clawed his way through two match points before slapping yet another forehand wide as Millman celebrated.
"Today he was definitely not at his best," Millman said. "But I'll take it."
And he'll face another hero in Djokovic for a place in the semi-finals, trying to become the first Australian man to win a Grand Slam since Lleyton Hewitt won Wimbledon in 2002.
"Last time I played him I got three games at Queens," Millman said. "Let's hope I get a few more."
- Try to survive -
Djokovic, who ended a 54-week title drought with his 13th Grand Slam title at Wimbledon, said he was relieved to get past 68th-ranked Sousa in straight sets, the searing afternoon heat seeming more of a problem than his Portuguese opponent.
"You can't do anything but try to be tough and survive, find a way to win," Djokovic said.
Kei Nishikori, runner-up in 2014, was also pleased to get through in three sets in blazing sunshine on Louis Armstrong Stadium.
After racing through the first two sets against Germany's Philipp Kohlschreiber he dropped his serve while serving for the match at 5-4 in the third, but managed to prevail 6-3, 6-2, 7-5.
Nishikori will fight for a semi-final berth against Croatian Marin Cilic, who beat him in the 2014 final.
Seventh-seeded Cilic, who needed eight match points in a five-set marathon against Australian teenager Alex de Minaur spilled into Sunday morning survived some tense moments to get past 10th-ranked Belgian David Goffin 7-6 (8/6), 6-2, 6-4.
Goffin served for the first set at 5-4 before Cilic went on to win the tiebreaker, sealing it on his third match point.
"I was thinking one match point, second match point -- I hope it's not going to the eighth one," Cilic said,
Published : September 04, 2018
By : AFP