The six-time Wimbledon champion has won the past three men's singles titles at the All England Club. Kokkinakis, 26, is ranked 79th.
French Open runner-up Casper Ruud, meanwhile, lost his second-round match, becoming the seventh of the top 11-ranked male players to be out of the tournament for either losing early, injury, illness or being banned. The third-seeded Norwegian was beaten by Ugo Humbert of France 3-6, 6-2, 7-5, 6-4.
Ruud was making his third appearance at the All England Club. His victory over Albert Ramos-Vinolas on Monday was his first at the grass-court Grand Slam.
The third-ranked Djokovic, No. 4 Rafael Nadal, No. 5 Stefanos Tsitsipas and No. 7 Carlos Alcaraz are the only players in the top 11 remaining in the draw.
Top-ranked Daniil Medvedev is out because of a ban on Russians over the war in Ukraine, No. 2 Alexander Zverev is injured, No. 8 Andrey Rublev of Russia is also banned, No. 9 Felix Auger-Aliassime and No. 10 Hubert Hurkacz lost, and No. 11 Matteo Berrettini withdrew after testing positive for COVID-19.
Djokovic hosted Boris Becker's girlfriend and the three-time Wimbledon champion's son in his box for the match. Becker, who previously coached the Serb, was sentenced to 2½ years in prison in Britain for illicitly transferring large amounts of money and hiding assets after he was declared bankrupt.
"I've just been trying to give support to people around him, his closest people, his family members, because I consider Boris really a family member, someone that I greatly appreciate, respect, and care about,'' Djokovic said. "We've been through a lot together during those three years of collaboration. Our relationship dates back even before that. Of course, after we finished our professional relationship, we always stayed close, him with my team, with my agents, with my family.
"He knows and they know that they can always count on me for whatever support or help I can provide.''
Fifth-seeded Carlos Alcaraz advanced to the third round with a 6-4, 7-6 (0), 6-3 victory over Tallon Griekspoor of the Netherlands, while 10th-seeded Jannik Sinner of Italy beat Mikael Ymer of Sweden 6-4, 6-3, 5-7, 6-2 to reach the third round.
Others to advance to the third round Wednesday included No. 9 Cam Norrie of Britain, No. 22 Nikoloz Basilashvili of Georgia, No. 23 Frances Tiafoe of the United States, No. 25 Miomir Kecmanovic of Serbia and No. 32 Oscar Otte of Germany.
The Associated Press contributed to this report.