Medvedev is a former US Open champion and has reached a further five major finals.
While the 29-year-old is regarded as a hard-court specialist, his recent results at Wimbledon offered confidence he could improve on his first and second-round exits at the Australian Open and French Open respectively earlier this year.
But Bonzi dominated key tie-breaks in the first and third sets before racing clear to victory in an impressive four-set finish after three hours and seven minutes.
Bonzi, whose unexpected win ended his six-match Tour-level losing streak on grass, will play Australian Jordan Thompson next.
“This is special for me today. It is my first top-10 win at a slam and it is always special at this tournament. I love this place,” said Bonzi.
“Daniil is a great player. I knew it was a tough match but sometimes it is better to play those players in the first round, when anything can happen.”
Elsewhere on Monday, Greek former world number three Stefanos Tsitsipas, 26, retired with injury after the 24th seed fell two sets down against French world number 113 Valentin Royer.
Tsitsipas later explained it was because of a long-standing back issue.
“Tennis is a rotational sport, and if you can’t rotate, then there’s no reason playing it,” Tsitsipas said.
“It’s something that I’ve been dealing with for many years now, my lower left-side back. It can be a very tricky injury.”