DOWNLOAD OUR APPS
The second seed in the Spanish capital has admitted he struggles on clay and fell to another defeat against Karatsev on the dirt, as he did in Rome two seasons ago.
After going nearly three hours on Monday in a three-set win over another Russian, Alexander Shevchenko, Medvedev secured an early break but Karatsev immediately struck back for 2-2.
They stayed on serve and Karatsev triumphed comfortably in the tie-break, his ball striking immaculate throughout the clash.
Medvedev complained fruitlessly about the shadows in the Arantxa Sanchez stadium, the second court in Madrid.
Ranked 121st in the world, qualifier Karatsev broke the 2021 US Open winner for 3-2 in the second set and only dropped two points on his serve after that to triumph.
"Feeling great, playing well, I just have to focus every match. I'll be preparing for the next round," said Karatsev.
"You just concentrate more (against the best players), you have to be 100 percent because they don't give you any free points, you have to concentrate, be mentally tough."
Earlier Karen Khachanov knocked out Andrey Rublev 7-6 (10/8), 6-4 in another all-Russian battle, and will face home favourite Carlos Alcaraz or Alexander Zverev in the quarter-finals.