The back-to-back upsets Monday have set up a very unexpected quarterfinal: Chung, the first Korean to reach the last eight at a Grand Slam, vs. 97th-ranked Sandgren, who had never won a match at a major or beaten a top 10 player until last week.
No. 58-ranked Chung relentlessly attacked Djokovic -- who is playing his first tournament since Wimbledon last July because of an injured right elbow -- in the 7-6 (4), 7-5, 7-6 (3) fourth-round win.
"First of all, I have to say I'm very grateful I had the chance to play," Djokovic said. "I didn't know if I'm going to play or not. So I played four matches here. It was a good tournament, of course. I mean, it's disappointing to go out in the fourth round. The circumstances are such. I have to accept it. That's the reality.
"It's frustrating, of course, when you have that much time and you don't heal properly. But it is what it is. There is some kind of a reason behind all of this. I'm just trying my best obviously because I love this sport. I enjoy training. I enjoy getting myself better, hoping that I can get better, perform and compete.
"Today was one of those days where, unfortunately, it was too much to deal with."
Chung ripped 47 winners, including a forehand on the slide and at full stretch that put him within two points of victory, in the almost 3½-hour match.
Chung credited the usually athletic Djokovic, who needed a medical timeout in the second set for a massage on his sore elbow, for the inspiration for that unlikely shot.
"When I'm young, I'm just trying to copy Novak because he's my idol," Chung said. "I can't believe this tonight. Dreams come true tonight."
When asked after the match about the status of his elbow, Djokovic said: "Yeah, it's not great. Unfortunately, it's not great. Kind of end of the first set it started hurting more. So, yeah, I had to deal with it till the end of the match."
Djokovic said he'll meet with his team to determine next steps.
"Last couple weeks I played a lot of tennis. Let's see what's happening inside," he said
Sandgren, 26, who entered the season's opening major ranked 97th, missed a match point in the fourth set but held on for a 6-2, 4-6, 7-6 (4), 6-7 (7), 6-3 win over Thiem. It followed up his earlier victory over 2014 champion Stan Wawrinka.
"I don't know if this is a dream or not -- all you guys are here, so maybe it's not," he said in an on-court TV interview after his 3-hour, 54-minute fourth-round win. "I'm not in my underwear, so maybe it's not a dream."
Sandgren is only the second man in 20 years to reach the quarterfinals in his debut at Melbourne Park.
He converted half of his eight break-point chances and fended off 10 of the 12 he faced against Thiem, and he hit 63 winners against 38 unforced errors in the biggest win of his life.
"Trying to keep riding the wave," said Sandgren, who was named after his great-grandfather and who comes from Tennessee.
The 19-time major winner had never played Fucsovics but had beaten his coach -- Attila Savolt -- here in the second round in 2002.
The win over Fucsovics was Federer's first day match of the 2018 tournament, and he joked about needing sunglasses and a towel for the beach but said really the only change was to set the alarm for a different time.
Information from The Associated Press was used in this report.