Kecmanovic, ranked 84th in the world, triumphed 6-3, 6-7 (3/7), 7-6 (7/4) over world number four Zverev, who was playing his first tournament since an epic semi-final defeat to eventual champion Carlos Alcaraz at the Australian Open.
Kecmanovic, 25, had come up empty in 11 prior career matches against top-five players.
He cruised through the opening set, before Zverev clawed his way back into the match, finally sealing the victory after two hours and 35 minutes.
"It feels amazing," said Kecmanovic, who was aided by 17 unforced backhand errors from the German.
"Obviously he's the big favorite, so I didn't have any pressure there, but you still have to play well when it matters, close out the match and thankfully it went my way," he added.
With Zverev’s defeat, the 500 level hardcourt tournament has now lost its top four seeds.
Second-seeded Australian Alex de Minaur was eliminated on Monday, third-seeded Casper Ruud of Norway lost on Tuesday.
Alejandro Davidovich Fokina, the fourth seed, exited also on Wednesday to Italy's Mattia Bellucci in straight sets.
