The 19-year-old German prodigy beat his rather more illustrious Swiss counterpart 7-6 6-7 7-6 in Wednesday's Hopman Cup match to take an overall 2-1 career lead.
Federer beat Dan Evans in straight sets on his return from a six-month injury layoff Monday as Switzerland overcame Great Britain 3-0.
He was to have no such luck against Zverev, however, as defeat saw Germany take a 1-0 lead over Switzerland Wednesday.
"To beat Roger, you really have to play an unbelievable match, from the first point to the last. I thought we both played really well," Zverev said courtside after his win.
"I always play unbelievably against him. It's always nerve-racking to play against him. I always play in front of a big crowd which helps me a lot as well."
Zverev's previous win against the 17-time grand slam champion came in the semifinals at Halle last year, while Federer had the upper hand at the Rome Masters.
Federer had Swiss partner Belinda Bencic to thank as the 19-year-old won her singles match against Andrea Petkovic to level the scores, before starring in the mixed doubles to give Switzerland a 2-1 win.
"She carried us to victory. She was the player of the doubles, the singles. She deserves the microphone," Federer said.
"I was six years old when I first watched Roger. It was amazing and I really wanted to be in the same position," Bencic added.
An altogether more lighthearted affair, the Hopman Cup sees players representing their countries in a round robin format.
Each session sees a women's singles, men's singles and mixed doubles match to decide the winner. The winning team from each group then competes in the final.
The cameraman even gives the players imaginary bongos to play and Federer was more than happy to oblige.
"It's easy to do the bongo like that when Belinda's winning -- but my dad wrote me an email and said can you please stop that right now," he laughed.
It was also a day to remember for an emotional mascot who couldn't hold back her tears after meeting Federer.
The Swiss pair will now face French duo Kristina Mladenovic and Richard Gasquet in their final Group A match.