This was his first chance to test himself against one of the sport’s big beasts and, for two sets, Musetti was mesmerising before fading dramatically, pulling the plug trailing 6-7 (7) 6-7 (2) 6-1 6-0 4-0.
His one-handed backhand is his signature shot and he used it brilliantly, pulling off spectacular winners but surprising Djokovic also with its versatility and robustness.
Musetti seemed comfortable in every situation while Djokovic looked edgy and made unexpected errors, particularly in the two tie-breaks – remarkably, the young Italian has won all 10 he has played at tour level.
When Musetti took the second set, one of the biggest upsets of recent years appeared on the cards, but Djokovic came out firing at the start of the third set and that was all it took to change the momentum completely.
Musetti suddenly could not find the court and his energy levels were rapidly approaching zero as Djokovic surged through the third and fourth sets – dropping just four points in the latter.
Musetti called the trainer before the deciding set for treatment and, with Djokovic in sight of the finish line, he opted to shake hands.
In the last eight Djokovic will face another Italian, Matteo Berrettini, who was the beneficiary of Roger Federer’s withdrawal.
Diego Schwartzman has made it through to the quarter-finals without losing a set, but that hardly tells the story of a dramatic 7-6 (9) 6-4 7-5 victory over German Jan-Lennard Struff.
Struff led 5-1 in the opening set and held seven set points, while he fought back from 4-0 down in the third set, but it was Schwartzman, a semi-finalist last year, who came out on top.