The 20-time Grand Slam victor and reigning champion Federer plays 13th seed Borna Coric of Croatia in Saturday's other semifinal.
"Well, to be honest, I'm not sure whether it has happened ever, you know, that I go through a tournament without dropping one service game", Djokovic said.
The second set did not start great for Ćorić who was broken in the opening game after he put a simple volley at the net wide.
"I did everything I meant to do on my end", the 31-year-old Serb, chasing his 32nd Masters title, said. "I wasn't, I feel like, playing as well as I'm playing today".
"Serving, I think, it's okay, could be even a little bit better".
"For sure I think he played really, really unbelievable tennis".
Federer won the Australian Open at the start of this year but has had a mediocre season by his sky-high standards.
Watch the wild footage from Kanye West's Oval Office meeting with Trump
Trump welcomed West to the White House on Thursday afternoon, saying the rapper "has been a friend for a long time ". So the fathers lose the jobs and they say we'll give you more money for having more kids in your home.
Coric, who has only two career titles to his name, has now beaten Federer twice - the previous time was in the final at Halle this year.
Zverev will next play second-seeded Djokovic in the semifinals.
The 31-year-old is in imperious form and this was his 17th ATP victory in a row, as he taught the rising German star a lesson.
This was a fourth Shanghai crown for Djokovic and he is homing in on a return to number one, having fallen as low as 22nd in May as he struggled following elbow surgery in February.
Novak Djokovic of Serbia celebrates after defeating Borna Coric of Croatia in their men's singles final match in the Shanghai Masters tennis tournament at Qizhong Forest Sports City Tennis Center in Shanghai, China, Sunday, Oct. 14, 2018. Obviously the last three, four months have been terrific for me.
That was until, however, Djokovic made the breakthrough with a break in the seventh and ninth game to take the first set.