The 33-year-old Serb made his feelings clear after he was broken when serving for victory in the second set.
“How much do you wanna play?” Djokovic yelled at umpire Nacho Forcadell. “I asked you three times, you are not checking anything.”
The match was eventually suspended for three hours before Djokovic secured a 6-3 7-6 (5) victory.
Djokovic said he had been struggling with the court conditions before the players were sent off the court at 5-5 in the second set.
“It’s not the first time or probably the last that I’m going to experience such conditions,” Djokovic, who has received an opening-round bye this week, told Amazon Prime.
“And even with that much experience behind me I still get upset and lose my cool. But it’s OK. At the end of the day these are great lessons — I will try and take away some important things from this day.”
Djokovic was disqualified from last year’s US Open after accidentally hitting a female line judge with a ball during his fourth-round match against Spain’s Pablo Carreno Busta.
American Reilly Opelka, who is playing in this week’s tournament after a bout with COVID-19 that kept him off the court entirely for more than two weeks and prevented him from practicing the way he usually does for nearly a month, won his second straight match — beating Lorenzo Musetti of Italy 6-4, 6-4 to reach the round of 16.
In the women’s bracket, Madison Keys defeated Sloane Stephens 6-4, 2-6, 7-5 in an all-American matchup. Three seeded players were upset — No. 10 Belinda Bencic (6-3, 6-4 to Kristina Mladenovic), No. 14 Elise Mertens (4-6, 6-2, 6-3 to Veronika Kudermetova) and No. 16 Johanna Konta (3-6, 1-6 to Jelena Ostapenko).
Reuters and The Associated Press contributed to this report.