Djokovic was never in trouble against a 22-year-old opponent from Argentina playing in his first main draw at Flushing Meadows. Djokovic's final shot hit the net and popped over to clinch the win.
Djokovic is always popular at Arthur Ashe Stadium, and fans kept yelling out to him from the far reaches as the hour ran late.
Djokovic has made it to the US Open final in each of the past four years. The 27-year-old from Serbia won the tournament in 2011.
Earlier, Andy Murray gritted his way through head-to-toe cramps to also win, spinning in 70 mph second serves and grabbing at his hamstring during points.
Murray outlasted Robin Haase 6-3, 7-6 (6), 1-6, 7-5 during an afternoon that was hot but not particularly humid. He was mystified that the cramps came on so early -- at the start of the third set after only about an hour and a half on court.
"When it starts to kind of go everywhere, you don't know exactly where it's going to creep up next," he said. "When you stretch one muscle, something else then cramps, too."
It started in the back of his left shoulder, then quickly spread to his forearm. The right-handed Murray couldn't toss the ball high enough to get any pace on his serves.
Between points, he'd twist his body to awkwardly stretch his left side. After hitting a winner, he'd reach for his quad.
Murray was twice down a break in the fourth set, but the 70th-ranked Haase unraveled with a string of unforced errors. He wasted three break points in the final game, when a missed call also cost him.
The eighth-seeded Murray had felt confident in his conditioning after productive training sessions in Miami, where he weathered far more heat and humidity than this. He wondered if something was amiss in his nutrition.
"Cramping in my left forearm?" a bewildered Murray said. "I mean, I didn't use my left forearm a whole lot today."
Haase, also bothered by some cramping, said he didn't eat and drink enough beforehand because of an earlier-than-expected start -- the first match on Louis Armstrong Stadium lasted just 47 minutes.
But Murray didn't think dehydration was his problem, indicating he didn't have any gastrointestinal problems.
Serving for the fourth set at 5-3, Haase double-faulted on break point to allow Murray to get back on serve. Murray then went up 6-5 when he took Haase's second serve high and whacked a forehand winner.
With Murray trying to serve out the match, Haase smacked a deep return on his second break point that might have won him the game. But the ball was called out, and after it was overturned on review, they had to replay the point. This time, Haase hit a volley into the net.
Murray is notorious for suddenly clutching at an ailment after a poorly played point. On this day, though, the misery was clearly real. The two-time major champion went after winners to shorten points, tried to stay upright to keep the strain off his legs. It was just enough to eke out the victory.
"I don't think if it would have gone to five sets I would've been the favorite," Murray said.
Three years ago, he and Haase did go five in New York, with Murray rallying from a two-set deficit to win in the second round.
After Monday's loss, Haase planned to complain to the ATP that he was denied treatment during the match for a sore foot. But the Dutchman insisted he wasn't distracted by Murray's shows of discomfort.
"I was more busy with myself, and I was struggling myself," Haase said. "I tried to play my game. It didn't bother me what he did."
Ninth-seeded Jo-Wilfried Tsonga also needed four sets to beat Juan Monaco 6-3, 4-6, 7-6 (2), 6-1. Nick Kyrgios -- the Australian teen who stunned Rafael Nadal at Wimbledon -- came back from three code violations, just one outburst away from default, in a 7-5, 7-6 (4), 2-6, 7-6 (1) upset of 21st-seeded Mikhail Youzhny.
Information from The Associated Press was used in this report.