Murray blew away a 4-2 lead in the decider as Nadal hit back to win 1-6, 6-3, 7-5 in two hours and 40 minutes on Friday. (Agencies)
Nadal, 27, will play Bulgarian Grigor Dimitrov, who progressed after German Tommy Haas's retirement, in the semi-final.
"I'm getting close to getting back to where I want to be, and that's pleasing with a couple of big months ahead," said Murray.
Nadal said he produced his best performance both physically and mentally to beat Murray.
"The physical part is really good, the mental part too, and my tennis is going to be there sooner or later," said Nadal.
"This was one of my best matches in a while," he added.
Earlier, two-time champion Novak Djokovic of Serbia edged past Spain's fifth seed David Ferrer 7-5, 4-6, 6-3 and will face Canadian eighth seed Milos Raonic, who beat Jeremy Chardy 6-3, 5-7, 6-2 in the other semifinal.
Murray blew away a 4-2 lead in the decider as Nadal hit back to win 1-6, 6-3, 7-5 in two hours and 40 minutes on Friday.