The top-ranked Djokovic set up a match against Dominic Thiem on Saturday as he goes for a record-tying sixth title at the season-ending event and a first since 2015.
Bouncing back from a straight-set loss to Medvedev on Wednesday, Djokovic broke Zverev to take a 2-0 lead in the first set when his opponent double-faulted on the second break point.
Djokovic saved two break points at 4-2 before clinching the set with a backhand down the line as he closed in on the net following a serve out wide.
Zverev posed more problems for Djokovic in the second set and led 2-0 in the tiebreaker. Djokovic then won five of six points and, on his first match point, sent a deep and penetrating forehand that Zverev could only slice into the net on the stretch.
Djokovic reached the semifinals of the event for the ninth time.
Medvedev will be going for a third straight group victory when he plays already-eliminated Diego Schwartzman in the late match.