World number one and seven-times winner Nadal was a set down after only 37 minutes and trailed 4-2 in the decider, but kept his composure to book a last-four clash with rising talent Grigor Dimitrov.
"Every win is special but this is a win that means a lot to me... I feel like I played as well as I have done for a while," Nadal said.
"I didn't ever think I was playing that badly despite being 6-1 down. I felt more positive than in the last match.
"I didn't have any negative thoughts inside me tonight. I closed out the match at the first opportunity and that's because of the positive energy I had."
On the other side of the draw, Djokovic maintained his hopes of a third Rome Masters title and 19th Masters Series crown although he was forced to dig deep to beat a tenacious David Ferrer 7-5 4-6 6-3 in a high-quality quarter-final.
Wimbledon champion Murray won the first five games in a blistering opening in which he limited Nadal to a handful of opportunities, including three wasted break points in the third game.
Yet Nadal came back strongly at the start of the second set, winning the first three games after Murray took a knock to his right knee stretching for a shot that hindered his movement around the court.
Murray was visibly less mobile after that and Nadal powered on to level the match.
It looked as though it would be plain sailing from then on but Murray fought back to lead a pulsating final set, only for Nadal to break right back and take match with a burst of nine points in a row.
"I'm disappointed with the game I played at 4-2, I was still in a good position but you don't get many chances against him. He finished very well and was physically stronger than me in the end," Murray said.
"Maybe I rushed a bit. I feel like I had the right shots in that match but messed them up."
Serbia's Djokovic looked to be in full control when he led 5-2 in the opening set but Spaniard Ferrer fought back to 5-5 and although he lost the opener the tone was set for an intense duel.
Djokovic eventually prevailed on his second match point having double-faulted on his first, the point in between being a 38-stroke baseline rally of extraordinary quality.
Djokovic will face Milos Raonic in the semi-finals after the Canadian beat Roger Federer's conqueror Frenchman Jeremy Chardy.
"It was the most physical match I had on clay this year," said Djokovic. "I am really glad to overcome this challenge because David is a great competitor. I respect him a lot.
"We all know how good his record is on clay - the best after Nadal. Knowing that I am going to work for every single point of the match, coming out as a winner gives me a lot of satisfaction and confidence."
Dimitrov reached his first masters Series semi-final when German veteran Tommy Haas retired from their match with a shoulder injury.
Celebrating his 23rd birthday Dimitrov was presented with a cake on the court which his coach Roger Rasheed splatted all over the Bulgarian's face.
"It was one of the most memorable days of my life," said Dimitrov. "I was just talking to my team, it's my first win on my birthday, so it feels good. It's a bit unfortunate, the way it ended up. But I'm just a happy birthday boy today.
In the women's Italian Open at the same atmospheric Foro Italico venue top seed Serena Williams breezed past Shuai Zhang 6-1 6-3 in a one-sided contest.
The American roared out of the traps, winning five games in a row and crushing any chance of resistance from the Chinese.
Zhang raised her game towards the end of the first set and made a decent fist of the second, but Williams's driving forehand and serving power was too much for the world number 43.
Williams will get the chance to avenge her Australian Open defeat to Ana Ivanovic in the semis after the Serbian 11th seed followed up her impressive win over Maria Sharapova with a thrilling 6-4 3-6 6-4 win over Spain's Carla Suarez Navarro.
Home fans were given something to shout about when Sara Errani reached the semi-finals with a superb 6-3 4-6 6-2 victory over world number two Li Na - her first career win against a player ranked in the top three.
The Italian will have another tough challenge in the semi-finals in the shape of world number eight Jelena Jankovic, who beat Agnieszka Radwanska 6-4 6-4.
- Sports & Recreation
- Grigor Dimitrov