The Austrian triumphed 7-5 6-3 in the quarter-final contest, just one day after the Spaniard set a new record of 50 set wins in a row on clay during his victory against Diego Schwartzman in the previous round.
After losing the opening set, the 31-year-old dropped serve in the seventh game of set two, but his opponent hit a return long on set point when leading 5-4, and did the same again to hand Nadal a break back.
However, the Spaniard followed up with a lacklustre service game and Thiem capitalised before holding firm in the final game, which he clinched with an unstoppable ace.
Incidentally, Nadal's last defeat on clay also came at the hands of Thiem, in May 2017 at the Italian Open.
Roger Federer will replace the Spaniard at the top of the world rankings following his performance in Madrid.