The Scot served for the match at 5-3 in the second set only to get broken, but promptly broke Nadal in the very next game to wrap up a victory that took well over two hours despite coming in straight sets.
"There are many things that go into the match, you have to do a lot of things very well," said Murray.
"I think I used my forehand pretty good throughout the match, I was able to push him back towards the baseline.
Barty eases past Kvitova to reach Madrid Open semi-finals
"I felt like I made a lot of returns in play, I didn't make too many mistakes on the returns so I was able to make him work hard in his service games."
Murray claimed the title last season, his first major win on clay, beating Nadal in the final - though the Spaniard was far from at his peak 12 months ago.
Nadal in recent weeks has been a much improved player, however, even if not quite as unstoppable as he was at his peak. The four-times winner represented a huge challenge in Madrid and was full of confidence having won titles in both Monte Carlo (beating Murray in the semis) and Barcelona ahead of this week's event.
On Saturday, however, neither player was in top form with Murray struggling on serve repeatedly as he gave up an astonishing 13 break points.
His nerve on those key points was almost perfect, however. He saved 11 of the 13, while grabbing all but two of the break points he earned against his opponent.
Andy Murray of Britain v Rafael Nadal of Spain - Madrid, Spain, 2016
Image credit: Reuters
"Against Rafa, he doesn't serve as hard as everyone else but he puts a lot of pressure on your return because if you don't hit a good one he dictates the point straight away," added Murray.
"The beginning of the second set in Monte Carlo, he came out having lost the first and really raised his intensity and I didn't. He got off to an early start in that second set in Monte Carlo.
"And he raised the intensity again in the second set today but I felt like I raised my level as well.
"It's easy after winning a tight first set to drop your intensity or your level but I really tried to keep that intensity high and that was important."
Even if Murray fails to defend his title in the final - against Novak Djokovic - the fact that he has made it to Sunday will be an enormous boost to his confidence ahead of the French Open in two weeks' time.
Apart from anything else it means that the world number two has made it to a final once more - the last time he did so was in Melbourne, where he lost the Australian Open against Djokovic.
But should he serve against Djokovic as he did against Nadal - a match in which just 54% of his first serves went in - then the world number one can expect to claim yet another trophy on Sunday.
Medvedev fights back to defeat Fokina for third-round spot in Madrid
Nadal beats birthday boy Alcaraz at Madrid Open