The Serbian saw his hopes of finishing the year as world No 1 ended by Nadal’s win over Stanislas Wawrinka on Wednesday but responded in style to beat Argentine Juan Martin del Potro 6-3, 3-6, 6-3.
Djokovic had to dig very deep at the start of the third set but his confidence is sky high at the moment and he guaranteed he will top Group B, while Del Potro and Roger Federer will fight it out for second spot on Saturday.
Earlier, Federer bounced back from his opening defeat by Djokovic to beat Richard Gasquet 6-4, 6-3.
The night match was a meeting between the two form players of the autumn.
Since the US Open, Djokovic and Del Potro had won 34 matches between them and five titles, while their meeting in London in the Wimbledon semi-finals was one of the matches of the season.
Djokovic won that one, as he had six of their previous seven meetings, and it was the second seed who dominated the first set once he had saved two break points in the opening game.
Del Potro withstood three break points in the fourth game and one more in the sixth but on his fifth chance Djokovic sent his opponent scampering from corner to corner before eventually Del Potro could resist no longer.
Djokovic was as good on serve as he was off the ground and he clinched the set with a second-serve ace.
Del Potro was simply not managing to dictate enough of the points but, in the second set, he stepped into the court more and got his reward, albeit with a big slice of luck as the ball dropped off the top of the net to give him a 4-2 lead.
Soon after that it was one set all and it was Del Potro who was on top going into the decider.
His big chance arrived with two break points in the third game but a forehand error cost him dearly and three games later he cracked as Djokovic broke to love.
The world No 2 has rediscovered the sureness at crunch moments of matches that was his trademark in 2011 and 2012, and he was rock solid as he served out the win to love.
Doubts remain about Federer’s game despite his much-needed victory over Gasquet.
The six-times champion lost his opening match for the first time at London’s O2 Arena when he went down in three sets to Djokovic on Tuesday. His 6-4, 6-3 win over Gasquet put him back on track to reach the semi-finals, but he will almost certainly need to beat del Potro tomorrow.
It was only his third win over a fellow top-10 player this season and Federer said: “The movement, the co-ordination is not exactly how I want it to be. Sometimes I’m in two minds.
“But that’s where I think today was just a battle for myself, making sure I move the right way, I play the right way, I have the right shot selection. Maybe also just getting used to the conditions a little bit.
“Richard does a good job of making you feel uncomfortable at the same time as well because he uses height and spins really well. He likes extended rallies. I’m trying to force the issue.
“But I guess those are the kind of matches I need right now – straight sets against a good player. It clearly comes at the right time.”
Federer has been open about his struggles this year as a troublesome back has contributed to a loss of confidence in his movement and decision making.
It is all a far cry from the days when Federer collected titles by the dozen and swept around the world’s tennis courts seemingly without a care.
He said: “I needed the hard-fought wins back then to go on and win tournaments.
“Now I feel like the hard-fought wins are there to get me back to a really good level, a very competitive level. I’m not coming back from a serious injury, but I’m coming back from a lot of ups and downs, resetting things, trying out things, making sure I get my confidence back, my movement and so forth. So it’s a totally different situation.”
There were plenty of nerves on show as Federer lost the first six points, although he recovered to hold serve.
It must have made a nice change for the Swiss to face a rival in his own image rather than a baseline scrambler.
Federer took control of the match with a break for 2-1, only to hand it back with a horrible game as Gasquet levelled at 4-4.
The sixth seed was let off the hook, though, Gasquet dropping serve straight away and Federer did not need a second invitation to wrap up the set.
It looked like Federer would run away with it when he began the second set by breaking serve again and had a point to make
But soon it was Federer under pressure, Gasquet forcing break points in three successive service games but failing to take them. The frustration on the Frenchman’s face as a delicate lob from Federer arced over him on the final chance told its own story.
It took Federer six match points to get over the line, but he clinched victory after an hour and 21 minutes when Gasquet dumped a forehand into the net.
Gasquet qualified for the tournament for the first time since 2007, but his hopes of making the semis are now over.
Order of play
Group A: David Ferrer (Spa) v Stanislas Wawrinka (Swi) (2pm); Rafa Nadal (Spa) v Tomas Berdych (Cze) (8pm).