Djokovic took a medical timeout during the second set and appeared distinctly uncomfortable, grimacing and stretching, but he avoided joining Rafael Nadal and Casper Ruud in making an early exit, coming through 6-1 6-7(5) 6-2 6-0 to set up a clash with Grigor Dimitrov.
Speaking to Eurosport afterwards, the 35-year-old said of the hamstring: "To be honest, it is not good at all. I will take it day to day.
"It was better last match, the feeling, than tonight, but that is all I can say and now it is up to God to help me and the physio and everyone. I hope I will be able to recover and be ready for a tough match next up."
Djokovic, who also called for a drunk spectator who was heckling him to be thrown out, came into the tournament with the injury having picked it up playing in Adelaide a fortnight ago.
He eased through his first-round match against Roberto Carballes Baena and said afterwards that his leg was improving, and there appeared to be no alarms in the first set, with Couacaud the cause for concern after rolling his ankle.
But, during the second, Djokovic started to show signs he was feeling the injury, calling for the trainer at 4-5 and heading off court.
The Serb has a reputation for managing apparently miraculous recoveries from physical ailments, winning the title here two years ago after tearing an abdominal muscle for example, but he was certainly not moving anywhere near his normal levels and pulled up several times while running.
He managed to find a way through this one despite losing a second-set tie-break he seemed to be in control of but there must be serious question marks about his chances of winning a 10th title in Melbourne.