Djokovic, 37, of Serbia, raised his game on Tuesday night at Roland Garros, winning 6-4 7-6 (7-3) 6-4.
With a fourth triumph on the Paris clay, the 24-time Grand Slam winner will assume exclusive possession of the record for the most major titles.
However, he arrived at the event in an uncertain state.
Djokovic has had a difficult season despite not making it to a final and being far from his legendary heights.
Saying he had “low expectations but high hopes” when he arrived at the French Open, he played in Geneva last week as a way to gain rhythm and confidence before going to the tournament.
It was therefore interesting to watch how Djokovic would fare against Herbert, the 142nd-ranked wildcard.
Djokovic’s movement at the baseline appeared uneasy at times, and his serve lacked some bite. He did, however, bounce back rather quickly and was still able to capitalize on his opportunities, most notably in a decisive tie-break.
Djokovic hasn’t seemed to have as much of the passion that has frequently driven his success this year, but his joy was evident in his animated celebrations after securing the two-set lead.
Before applying more pressure in what turned out to be the decisive game of the match, he had little opportunities in the third set.
Herbert made a double fault after a breathtaking winner at deuce set him the first match point. The world number 63 Roberto Carballes Baena of Spain will play Djokovic in the second round.
“I’m glad I started the way I started, the way I felt on the court,” Djokovic said.
“I felt good, better than the previous weeks of tournaments I played [recently].” I’m heading in the right direction.”