The 35-year-old Swiss, who is aiming for an eighth Wimbledon crown next month, beat his opponent 6-1 6-3 in just 53 minutes in Germany.
Zverev is regarded as one of the world's most promising young players and climbed into the top 10 earlier this year after winning three tour titles.
He also beat Federer in last year's Halle semi-final, but this time he struggled to impose himself against the veteran, who dropped just nine points on his serve.
Federer broke to love in the opening game, going on to take a 4-0 lead as his German opponent struggled to find rhythm in front of a home crowd.
Zverev managed to hold his serve at the third opportunity, but Federer broke again at 5-1 to claim the first set in just 22 minutes.
The Swiss top seed survived a break point in the opening game of the second set and then moved 4-2 ahead before taking his first championship point with a backhand volley.