The title favourite admitted after needing a medical timeout and dropping a set to French qualifier Enzo Couacaud that he was concerned, and a clash with 27th seed Dimitrov was a much better test of his physical condition.
He took another timeout after falling to the floor at the side of the court at the end of the first set but, despite continuing to limp and looking uncomfortable at times, clinched a 7-6 (7) 6-3 6-4 victory to reach the fourth round.
It was only two years ago that Djokovic tore an abdominal muscle during the tournament yet still managed to win a ninth title, and none of his rivals will be expecting him to give up the chance of a 10th without an almighty battle.
Djokovic said: "It kind of always starts well and then some movement happens and then it gets worse. Pills kick in, some hot cream and stuff, that works for a little bit, then it doesn't, then works again. It's really a roller coaster, honestly.
"It requires a lot of energy that is being spent from my side mentally and physically, as well, to deal with the match with my opponent and also with a not-ideal physical state.
"But it is what it is. It's kind of circumstances that you have to accept. I'm just very grateful that I'm actually able to play. The way it looked just before the tournament started, I thought that it wouldn't be possible.
"I'm still here and still holding on. I don't know what awaits, but I do hope and I have faith for the best."
The strapping on Djokovic's left leg was even more substantial than on previous days but he settled well into the match, breaking serve in the opening game.
Dimitrov saved three set points at 5-3 and it appeared Djokovic was in full control but he was broken serving for the set and then had to save two set points, one at 5-6 and one in the tie-break.
When he took the set with a volley, the crowd would have expected to see a celebration, but instead Djokovic collapsed to the court looking stony-faced and called for the trainer.
The pain was evident on his face as he had the muscle massaged but, although there were moments when Djokovic did not appear to be moving properly, particularly going forwards, he was able to hare around on the baseline seemingly without too much hindrance.
Having beaten Dimitrov nine times in their previous 10 meetings probably helped. The Bulgarian at times threatened to make things complicated for Djokovic but, despite going down on the court twice more, he found a way through to set up a clash with Australia's Alex De Minaur.