In the quarterfinal, seventh-seeded Rublev of Russia overcame a set down to win 4-6 6-3 6-2 and end Alcaraz’s 14-match winning run in the Spanish capital.
The 20-year-old second seed wanted to make history by being the first person to win three straight Madrid Open singles championships.
Rublev will play American Taylor Fritz, the 12th seed, who won his 250th career match at the tour level by defeating Francisco Cerundolo of Argentina 6-1, 3-6, 6-3.
After a nearly three-hour-long, exhausting victory over Jan-Lennard Struff on Tuesday, Alcaraz was unable to reach his best against Rublev.
Earlier this month, the two-time Grand Slam champion was absent from clay court competitions in Barcelona and Monte Carlo.