Failing to win his 850th match, the top seed Serb lost to 22nd-seeded Roberto Bautista Agut 1-6, 7-5, 6-3.
Top seed Novak Djokovic was upset by Roberto Bautista Agut 1-6, 7-5, 6-3 in the fourth round of the Miami Open Tuesday.
The world No 1 was looking to win his 850th match but fell short.
Djokovic was leading 6-1, 4-5 when rain delayed play for 30 minutes. Returning to the court, Djokovic surrendered his serve on a second break point in the 12th game to lose the second set.
Djokovic recouped one service break in the third set, but he lost his serve again in the sixth game to fall behind 2-4.
Djokovic holds a 7-3 career record over Bautista Agut, but the Spaniard has now beaten him the past two times they've played.
The 22nd-seeded Bautista Agut defeated Djokovic in a three-set semifinal at the Qatar Open in January.
Earlier in the day, defending champion John Isner advanced to the quarterfinals with a 7-6 (5), 7-6 (3) win over 19th-seeded Kyle Edmund.
Isner pounded 17 aces and lost one service game in the match. He surrendered the ninth game of the first set at love.
Isner's won nine straight matches at the Miami Open going back to hoisting the trophy last year.
That victory —the most prestigious of the 14 titles in his career — made him the first American champion of this tournament since Andy Roddick in 2010.
Isner has played five tiebreakers in six sets during his three match wins.