The U.S. Open runner-up, who lost in the fourth round of the Australian Open last month, dropped his serve twice but broke the Italian's serve four times. Medvedev, ranked fifth in the world, had seven aces, and faces French veteran Gilles Simon next - who won their two previous meetings.
Simon meanwhile advanced with a 7-6 (6), 6-4 win against Aljaz Bedene.
Elsewhere on Thursday, fourth-seeded Denis Shapovalov won 6-4, 4-6, 6-2 and hit 17 aces in a win against Croat Marin Cilic. In the biggest shock of the day, Egor Gerasimov took apart third ranked David Goffin 7-4, 7-6.