Djokovic extended his Australian Open winning streak to 27 matches, the longest in the Open era, which dates to 1968.
The 18-year-old from Florida moved into the third round at Melbourne Park for the first time since 2020.
Victoria Azarenka beat No. 3 seed Jessica Pegula 6-4, 6-1 to return to the semifinals at Melbourne Park for the first time since those triumphs in 2012 and 2013.
Pegula's had a winding journey in professional tennis and, at the Australian Open, she is hoping to add by far her most significant trophy yet.