The Serb beat the American 6-2 7-6 to set up a meeting with either the defending champion Steve Johnson or the fast-rising Russian Daniil Medvedev.
Djokovic decided to compete during the week before Wimbledon for the first time in seven years in order to boost his match confidence after a poor year by his lofty standards.
He was eliminated in the second round at the Australian Open in January, failed to make a mark during the American hard court season in the spring and was unable to capture any of the clay court events before the French Open where he was divested of his crown in the quarter-finals.
Djokovic appeared back to his battling best as he saved two set points to prevent the contest entering a deciding set. He clinched the tie on his third match point.
Meanwhile, the world number one Andy Murray excused himself from an exhibition match on Friday in order to nurse a sore hip. The 30-year-old Briton was scheduled to play at the Hurlingham Club in west London shortly after the draw for Wimbledon where he is the top seed for the first time in his career.
Murray, who has won the trophy at the All England Lawn Tennis Club twice, said on Thursday that rest would be the best remedy.
"Sadly I won't be ready to play at Hurlingham," he said. "My hip is still sore and I need to rest it."
Anxiety over the world number one's form rose after a first round loss to world number 90 Jordan Thompson at the Queen's tournament in west London. He was also cancelled an exhibition match with Frenchman Lucas Pouille on Tuesday.