"He's got a very solid backhand. He hits it very low and with depth," Djokovic said.
"A windy day like today, conditions are changing every single game. It's kind of tough to find the rhythm, and he doesn't give you much rhythm.
"He improved his movement a lot since last year. He definitely deserves to be where he is."
Medvedev will next face another Serb in Dusan Lajovic, who followed up his shock win over world number five Dominic Thiem with a 6-4 7-5 victory over Italian qualifier Lorenzo Sonego.
For Djokovic, it was another premature exit from an ATP Masters 1000 event after he crashed out in the early rounds at Indian Wells and Miami last month.
The 31-year-old has struggled for rhythm in his first claycourt event of the season and will need step up his game to have a chance of winning his fourth straight Grand Slam title at next month's French Open.