The Serb at one point fell ill on the court but rallied from a break down in the third set to claim the victory.
Djokovic, seeking his second straight major title and 14th overall, will meet American Tennys Sandgren in the second round.
The two met in the first round at Wimbledon with the former world number one coming out on top 6-3, 6-1, 6-2.
Quick start for Djokovic
Djokovic was on top early as he broke after Fucsovics netted a forehand. Adding a second break, the Serb was ahead 3-0.
Not troubled on serve, he stretched the lead to 5-2 before the Hungarian held to force the former world number one to serve out the set.
Falling behind 0-30, Djokovic rallied to claim the last four points and take the opening set.
The Serb is 221-8 in majors after winning the opening set, but he seemed to begin to feel the effects of the brutally hot weather.
Fucsovics rallies, takes the lead with Djokovic struggling in brutal heat
With his eyes rolling and the temperature up to an alarming 96 degrees, Djokovic wasted a 0-30 lead on Fucsovics' serve, the Hungarian holding and then breaking when the Serb double-faulted and sent a forehand long to give the world number a 4-2 edge.
After holding with a beautiful winner down the line for a 5-2 lead, Fucsovics sealed the set two games later to level the match and continued his momentum into the third when a struggling Djokovic slapped a forehand long as he was broken to love, giving the Hungarian a 2-1 lead.
Djokovic mounts comeback to take final ten games of the match
Although he saved break points in the first and fifth games, the unforced error count was piling up for the 13-time major champion and he was trailing 4-2 but he regrouped, breaking back with a glorious crosscourt backhand winner.
Two games later, on set point, Fucsovics bungled a forehand volley followed by a smash with a forehand miss giving the Serb a two sets to one lead.
With a new rule just implemented by the USTA to give the men a ten-minute break in between the third and fourth sets, Djokovic understandably took full advantage of the break and quickly raced out to a break lead in the fourth set with Fucsovics struggling in all areas.
The Serb was relentless and sped the through the final set without the loss of a game to claim a well-earned victory in blazing hot conditions.