Djokovic was seeded No. 1 and seeking a fourth championship in New York. But he's been troubled by a painful left shoulder and did not look to be close to his best for much of the night against Wawrinka.
Djokovic was trailing 6-4, 7-5, 2-1 when he quit.
Novak Djokovic will have to make a big comeback to keep his U.S. Open title defense alive.
Stan Wawrinka has a 6-4, 7-5 lead against Djokovic, seeking to beat him in their first meeting since the 2016 U.S. Open final.
The top-seeded Djokovic blew a 4-1 advantage in the second set.
Daniil Medvedev has a message for the U.S. Open fans who boo him: Just keep it coming.
Medvedev stood in the middle of Louis Armstrong Stadium after his 3-6, 6-3, 6-2, 7-6 (2) fourth-round victory over Dominik Koepfer and, arms outstretched, drank in the boos that rained down on him from fans who apparently still hold a grudge over his previous match, when he angrily snatched a towel from a ballperson and flashed his middle finger by the side of his face.
The fifth-seeded Russian once again threw it back at the crowd WrestleMania style, explaining that he had an aching shoulder before the match but was motivated to go out and play by those in the crowd who came out to boo him.
"You give me so much energy to win — thank you!" he said. "You are the best!"
The near-capacity crowd was clearly behind Koepfer, a German qualifier and former standout at Tulane who made Medvedev work with deep, lefty forehand drives and sharply angled winners. Several times, the fans broke out in spontaneous chants of "Let's go Koepfer! Let's go Koepfer!"
New York fans will no doubt be ready to cheer, and boo again when Medvedev moves on to play the winner of the match later between top-seeded Novak Djokovic and No. 23 Stan Wawrinka.
Mike Bryan has been fined $10,000 at the U.S. Open for pointing his racket as if it were a gun during a doubles match.
Bryan, whose twin brother is his partner, was called for a code violation for unsportsmanlike conduct in the last game of the second set after making the gesture.
After a lob by their opponents was ruled in, the Bryans challenged the call. A replay review showed that the ball landed out. That's when Bryan pointed toward the chair umpire and line judge with a finger, then placed the head of his racket on his shoulder and pretended to "aim" the handle.
It's the highest fine given to a man so far at this year's U.S. Open.
U.S. Tennis Association spokesman Brendan McIntyre said: "The gesture warranted that amount."
The Bryans' match Saturday night was played hours after a man in Texas shot seven people to death and injured 22 others.
That was the 25th mass killing in the U.S. so far this year, matching the number in all of 2018, according to The AP/USATODAY/Northeastern University mass murder database. The database tracks homicides where four or more people are killed, not including the offender.
Coco Gauff is back in the win column at the U.S. Open.
A night after getting knocked out of the singles tournament by No. 1 Naomi Osaka, Gauff teamed with Caty McNally to move into the third round of women's doubles.
Team McCoco, as they are calling themselves, beat the No. 9-seeded team of Nicole Melichar and Kveta Peschke 6-3, 7-6 (9) before a crowd that was packed to the top of Louis Armstrong Stadium.
Gauff, 15, and the 17-year-old McNally remained unbeaten as a team, having won the U.S. Open junior title last year and teaming for their first WTA doubles title this summer in Washington.
They advanced to face the eighth-seeded team of Ash Barty and Victoria Azarenka. Barty, ranked No. 2 in singles, won the U.S. Open doubles title last year with CoCo Vandeweghe.
Serena Williams rolled her right ankle but that didn't seem to slow her down in a 6-3, 6-4 victory over Petra Martic that moved her into the U.S. Open quarterfinals for a 16th time.
Williams, who received treatment on her ankle during a changeover midway through the second set, came back with little trouble against the 22nd-seeded Martic. The No. 8-seeded Williams blasted 38 winners and won nearly 80 percent of her first-serve points in a match that lasted a little more than an hour and a half.
She said after the match that she rolled the ankle and wanted it taped to get pressure on it quickly.
Williams, a six-time U.S. Open champ and 23-time Grand Slam tournament winner, moves on to play Wang Qiang, who stunned No. 2 seed Ash Barty earlier Sunday in straight sets.
Add third-seeded Karolina Pliskova to the list of top women to fall at the U.S. Open. Johanna Konta beat her 6-7 (1), 6-3, 7-5 to move into the tournament's quarterfinals for the first time.
The 16th-seeded Konta, who has reached the semis of all the other Grand Slam tournaments, struggled at times to overcome the hard-serving Pliskova, blowing a 5-3 in the first set and having to overcome 16 aces.
No. 2 Ash Barty fell in the previous match on the same Louis Armstrong Stadium court in straight sets to Wang Qiang.
Next up for Konta is the winner of the night match on Arthur Ashe Stadium between fifth-seeded Elina Svitolina and No. 10 Madison Keys.
In a men's match that ended at about the same time, Grigor Dimitrov downed Alex de Minaur 7-5, 6-3, 6-4 to advance to the quarterfinals at Flushing Meadows for the first time. The No. 78-ranked Dimitrov, who is trying to regain the form that pushed into the top three in the rankings two years ago, next faces No. 3 seed Roger Federer.
Roger Federer has gotten his groove back. The No. 3 seed cruised through his second straight easy victory at the U.S. Open, beating David Goffin 6-2, 6-2, 6-0 to move into the his 13th quarterfinal at Flushing Meadows.
Federer, who dropped the first set in each of his first two matches, hasn't dropped a set since. He thoroughly dominated the No. 15 Goffin in 1 hour, 19 minutes, blasting 35 winners to just eight for his opponent and serving up 10 aces. Federer closed out the match after a 20-stroke rally with an emphatic backhand winner down the line.
The five-time U.S. Open champion continues his quest for a record 21st Grand Slam tournament title against the winner of the match currently underway between Grigor Dimitrov and Alex de Minaur.
Second-seeded Ash Barty is out of the U.S. Open, beaten 6-2, 6-4 by Wang Qiang, who advanced to a Grand Slam quarterfinal for the first time.
The 18th-ranked Wang, who had never been beyond the third round of a major in 20 tries, kept Barty back with consistent groundstrokes that landed deep in the court and she had just 14 unforced errors to her opponent's 39. Barty overcame three match points before Wang finally served out the match, pumping her fist in the air as the Australian's return sailed long.
Barty's loss ends an impressive run of Grand Slam performances this year, having won the French Open, reached the quarterfinals of the Australian Open and the round of 16 of Wimbledon. That record, along with titles at tour events in Miami and Birmingham, England, helped her hold the No. 1 ranking for nearly two months this summer before Naomi Osaka regained the spot.
Wang, the first Chinese woman to get this far in the U.S. Open since Peng Shuai made a run to the semis in 2014, next faces the winner of the match later between No. 8 Serena Williams and No. 22 Petra Martic.
Novak Djokovic would be a little closer to Roger Federer's record for men's Grand Slam singles titles if he'd done better against Stan Wawrinka.
They meet Sunday for the first time since Wawrinka's victory in the 2016 U.S. Open final, with a trip to the quarterfinals going to the winner.
Wawrinka also beat Djokovic in the 2015 French Open final. The top-ranked Djokovic has 16 major titles, four behind Federer.
Federer faces No. 15 David Goffin in the fourth round, where the five-time U.S. Open champion lost last year.
Serena Williams also plays her fourth-round match, while teenagers Coco Gauff and Caty McNally face the ninth-seeded team of Nicole Melichar and Kveta Peschke in a second-round women's doubles match.
Daniil Medvedev then follows them onto Louis Armstrong Stadium, where the No. 5 seed was loudly booed during and after his third-round victory Friday.
More AP Tennis: https://www.apnews.com/apf-Tennis and https://twitter.com/AP_Sports