Playing against an opponent he defeated both times in straight sets in the past, Djokovic lost his serve four times in the match on Rod Laver Arena.
Second seed Novak Djokovic was forced to work hard by Germany's Jan-Lennard Struff in his first match of the Australian Open on Monday before prevailing 7-6(5) 6-2 2-6 6-1 to stay on course for a record-extending eighth title at Melbourne Park.
Playing against an opponent he defeated both times in straight sets in the past, Djokovic lost his serve four times in the match on Rod Laver Arena, where he beat Rafa Nadal in last year's final to pick up a seventh Australian Open title.
The 32-year-old, however, managed to play at a different gear in the fourth set and in the end appeared in control of the match against the big-serving German.
"Overall it was a really solid start, especially in the second and the fourth set I played on a higher level. (I) served pretty good, lots of aces, high percentage of first serves in," Djokovic told reporters.
"I felt kind of in control of the match. Even when I lost the third set I just felt like 'if I am on the right level, I have the upper hand'. I ended this match in a good fashion, in a right way and this is very positive."
Djokovic got off to a strong start for a 5-2 lead in the opening set but the German world number 37 fought back to level things at 5-5 before going down in a closely fought tiebreaker.
The second set proved relatively simpler for the winner of 16 Grand Slam singles titles as he converted two breakpoints while showing the same kind of form that helped him lead Serbia to the inaugural ATP Cup title before arriving in Melbourne.
Struff continued to persevere, breaking his opponent three times in the third set, but Djokovic wrested back initiative early in the fourth and closed the match out with the third break of the German's serve.
"I actually like tough first rounds in Grand Slams particularly," said Djokovic.
"Historically I had lots of success in Grand Slams where I had tough opponents in first round. Because it gets me going. From the beginning I have to be alert, I have to be on a high level. I think I was.
Djokovic will meet either Japanese wildcard Tatsuma Ito or lucky loser Prajnesh Gunneswaran of India in the second round.