World number four Ferrer, ranked one place above Nadal following the Majorcan's seven-month layoff with a knee injury, showed why he is considered one of the most tenacious competitors on the circuit to take the first set of the last-eight clash at the clay Masters event.
Nadal clung on to edge the second-set tiebreak 7-3 and then switched up a gear in the decider to set up a semi-final meeting on Saturday against wildcard Pablo Andujar, the Spaniard beating Japanese 14th seed Kei Nishikori 6-3 7-5.
Nadal had a scare when leading 4-0 in the third set when his racket bounced up off the court as he was stretching down to play a shot and struck him above the eye.
After a brief interruption he was able to continue and closed out the victory on his first match point when he broke Ferrer for a seventh time.
"It was a very tight match," Nadal said in an interview with Spanish television broadcaster La Sexta.
"I think maybe David deserved more than me to be in the semi-finals but that's sport for you," the 26-year-old added.
"In the third set David dropped his intensity a bit and I didn't have to do all that much.
"I was playing aggressively on my forehand and I am very pleased with how that is going, it's working much better than in the events leading up to Madrid."
Second seed and defending champion Roger Federer became another high profile casualty on Thursday when he lost his third-round match to Nishikori of Japan.
Former world number one Nadal has won four titles since his return from injury in February and will be chasing an eighth Roland Garros crown in Paris starting later this month.