Novak Djokovic was booed after withdrawing due to a shoulder problem ©Getty Images

Defending champion and top seed Novak Djokovic withdrew from his US Open fourth round clash against Stan Wawrinka and was then booed off by the Flushing Meadows crowd.

The Serbian, who has struggled with an injury to his left shoulder, was trailing the Swiss 6-4, 7-5, 2-1 when he retired from the match at Arthur Ashe Stadium.

Djokovic, who was aiming for a 17th Grand Slam title and a fourth US Open, left the court to jeers.

He responded by giving the thumbs-up sign and later said: "Look, I'm not being offended by or mistreated by anybody.

"I don't really pay too much attention on that. 

"You know, I like to respect others. 

"I hope that others can respect me and my decision.

"I'm sorry for the crowd. 

"Obviously they came to see a full match, and it just wasn't to be. 

"That's all it is. 

"I mean, a lot of people didn't know what's happening, so you cannot blame them."

Daniil Medvedev played up to the jeering crowd again at Flushing Meadows ©Getty Images
Daniil Medvedev played up to the jeering crowd again at Flushing Meadows ©Getty Images

Wawrinka, the 23rd seed and three-time Grand Slam winner who won the US Open in 2016, has now advanced to a quarter-final with Russia's Daniil Medvedev.

"Obviously I'm not the first and not the last player to get injured and to withdraw from one of the biggest events in sport," Djokovic added.

"But obviously, I just came off the court, so of course it hurts."

The booing was widely criticised on social media with some calling it "shameful" and "embarrassing".

Jeers were also a part of Medvedev's 3-6, 6-3, 6-2, 7-6 win over Germany's qualifier Dominik Köpfer as he continued his role as tournament villain.

The fifth seed angered the crowd during his third round win over Spain's Feliciano Lopez by snatching a towel from a ball person, throwing his racket and flashing his middle finger.

He celebrated today's victory by standing in the middle of court with his arms outstretched, further annoying the fans in New York.

"Thank you all, guys, because your energy tonight gave me the win," the Cincinnati Masters champion said.

Elsewhere in the men's draw, Switzerland's third seed Roger Federer breezed into the last eight.

The 38-year-old 20-time Grand Slam champion is chasing an open-era record sixth US Open crown and defeated Belgium's 15th seed David Goffin 6-2, 6-2, 6-0.

Bulgaria's Grigor Dimitrov also advanced as he beat Australia's Alex de Minaur 7-5, 6-3, 6-4 in an all unseeded clash.

He will now square off with Federer.

In the women's draw American icon Serena Williams marched through to the last eight on home soil.

The 37-year-old, who has won 23 Grand Slams and is hoping for a seventh US Open, beat Croatia's 22nd seed Petra Martić 6-3, 6-4.

Serena Williams was comfortable as she made the quarter-finals  ©Getty Images
Serena Williams was comfortable as she made the quarter-finals ©Getty Images

Williams, the eighth seed, was beaten in an ill-tempered final by Japan's Naomi Osaka last year and went through on a day when both the second and third seeds tumbled out.

Australia's second-ranked Ashleigh Barty, the French Open champion, fell 6-4, 6-2 to China's 18th seed Wang Qiang.

Third seed Karolína Plíšková of the Czech Republic was defeated 6-7, 6-3, 7-5 by Britain's Johanna Konta. 

Ukrainian fifth seed Elina Svitolina did make it through, disappointing the home crowd as she saw off American Madison Keys, the 2017 runner-up, 7-5, 6-4.

Williams will now meet Wang with Konta and Svitolina locking horns.

The remainder of the fourth round matches will be played tomorrow at the hard court event, the last Grand Slam of the year.

Top seed Osaka will take on Switzerland's 13th seed Belinda Bencic, while Spain's three-time winner Rafael Nadal will meet another former champion in Croatia's Marin Čilić.