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.
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.
Ruud admitted a lengthy exhibition tour with Nadal may have compromised his chances following his 6-3 7-5 6-7 (4) 6-2 defeat by American Jenson Brooksby earlier in the day.
Ruud, a finalist at the French Open and US Open last year, had limited pre-season training after joining Nadal on a tour of Latin America lasting nearly two weeks.
The Norwegian said: “It’s very easy to sit here now and say that was bad for maybe both Rafa and I due to the fact that we lost early here.
“(The preparation) was maybe not enough to be able to perform well here this year. So it will be considered by me and my team what we will do in December this year, and if this was the right way to prepare for the Australian Open or not.
“Maybe it looks like it was not the right way, but there are many factors that come into play.”
Ruud struggled from the start with the unorthodox style of 22-year-old Brooksby, who is named after former British racing driver Jenson Button.
He had reason to curse his luck, too, after losing the second set when a shot from Brooksby hit the tape and dribbled over the net.
Ruud then took an off-court medical timeout for what he later revealed to be an ongoing abdominal issue and was clinging on by his fingernails at 5-2 down in the third but Brooksby was unable to serve it out, missing three match points in agonising fashion.
Ruud looked like he might turn the match around when he took the tie-break, with Brooksby beginning to struggle physically, but he forged ahead again and finally clinched his fifth match point.
He raised weary arms in the air, and then said: “I was really proud of the mental resolve after the third set didn’t go my way.”
It has been a hugely successful tournament so far for the American men, with eight through to the third round.
Tommy Paul, JJ Wolf and Michael Mmoh all upset seeds, with the latter taking out 12th seed Alexander Zverev, who is finding things tough after returning from a long-term ankle injury.
The former US Open finalist said: “My foot is healthy but I’m not at the physical level that I was. I’m not as fast. Definitely my conditioning is not as good as it was. So I think I still have a long way to go to there.”
Ben Shelton, who is on his first trip outside the US, is also through to the last 32 but America’s highest-ranked man, eighth seed Taylor Fritz, is out after losing in five sets to Australian wild card Alexei Popyrin.
Roberto Bautista Agut fought off a fine challenge from another young American, Brandon Holt, recovering from two sets down, while fifth seed Andrey Rublev and ninth seed Holger Rune are also through.