Ostensibly there was nothing for either man to play for - 200 ranking points and £109,000 aside - with Nadal already guaranteed top spot in the group and Ferrer eliminated.
But for two hours and 37 minutes they traded blows until Nadal, who has never won this tournament, finally prevailed 6-7 (2/7) 6-3 6-4.
The fifth seed must have thought it would be a straightforward afternoon when he broke serve twice to lead 3-0 in the opening set but it turned out to be anything but.
Nadal, who beat both Stan Wawrinka and Andy Murray in straight sets, must now recover for a semi-final clash with world number one Novak Djokovic on Saturday.
Djokovic and Nadal have played each other more times than any other two players, and Djokovic will look to tie their head-to-head for the first time at 23-23.
The Serbian has dominated the rivalry over the past two years, winning seven of their last eight matches, and has not dropped a set to Nadal this year.
But he knows the Spaniard is playing his best tennis of the season having rediscovered his form and confidence.
Djokovic said: “It’s a fact that he’s been playing better and he’s been raising his level ever since the US Open, I think.
“The first couple of matches he played here against Wawrinka and Murray showed that, showed that he feels more confident, shows that he’s starting to miss less, serve efficiently, use his forehand much better.
“I know that, I’ve been watching. I know what is expected of me. We played so many times. I’m going to get ready for that one and hopefully I’ll be able to play at my best.”
Djokovic came into the tournament on a 22-match winning run and having lost only one set since the US Open final.
But his momentum was stalled by a loss to Roger Federer, his first indoor defeat in three years, and he was below his best again against Tomas Berdych, albeit in victory.
Djokovic said: “The last two matches haven’t been at the level desired, but I still managed to win two and lose one and I’m in the semi-finals.
“With the amount of wins I had this year, with the quality of tennis that I’ve played, I’m going to approach that match really optimistically as I always do.”
Federer, who will take on the winner of Friday night’s match between Wawrinka and Murray in the other semi-final, tipped Nadal as a potential title winner in London and is already expecting big things from him in 2016.
“I think he’s only going to get better,” said Federer.
“In the back end (of the season) he showed what’s to come in 2016, in my opinion. Then, with some time to practise and reassess his game, he’s going to be tough to beat in Australia. I believe that.
“Of course he can win the tournament here after his convincing wins against Murray and Stan.”