This time the world number one fought back from two sets down but still looked doomed to defeat when Federer broke in the deciding set and served for victory.
However, a stunning forehand return on the third seed’s first match point turned the tide and Djokovic reeled off four games in a row to triumph 6-7 (7/9) 4-6 6-3 6-2 7-5 in three hours and 51 minutes.
The Serb is now one win away from a third grand slam title of the year while Federer’s loss means he will finish a season without one for the first time since 2002.
Neither man managed to trouble the other on serve during the first 12 games, so it was into a tie-break they went.
Djokovic cracked first, losing both points on his serve, the second on a double fault, to leave Federer 5-2 ahead and with two serves for the set.
He also sent down a double fault but still brought up three set points. Suddenly Djokovic found another level, saving all three, the second after a stunning point that saw the pair trading mighty groundstrokes before the top seed won it with a forehand.
It was the same story on the following point, and Djokovic also saved a fourth set point, but he could not create a chance for himself and on the fifth opportunity Federer hit a stunning backhand winner down the line.
Although this season has been all about Djokovic and Rafael Nadal, Federer has also been in good form, particularly at the grand slams, with his one-handed backhand looking as good as it ever has.
The 30-year-old’s backhand down the line was proving to be a crucial shot and he used it again to bring up a third break point in the third game of the second set, which he took with a forehand winner.
The match was then briefly held up when a spectator collapsed but, although Federer let his break slip away in the sixth game, he responded in stunning fashion by breaking again to love, and this time there was no way back for Djokovic.
The start of the third set in Paris had been when the Serb raised his game, and it was the same again today, Djokovic risking more and earning his rewards with a break in the second game.
Federer resisted manfully but on the third break point he netted a backhand, and Djokovic was rock solid on serve as he reduced the deficit.
The opening game of the fourth set was a big one for Federer, who was still hitting stunning winners but also making more errors, and it was the latter that cost him as Djokovic secured another break with a brilliant backhand at full stretch.
Federer had gone right off the boil and he dumped a backhand into the net to hand his opponent another break for 4-1.
The Swiss did manage to save a first set point for Djokovic to prevent him making it four games in a row, and the top seed was then pegged back from 40-0, losing his first points on serve in the set, but he did not have to wait long.
With the match all square, there was no doubt the Serb was now a heavy favourite.
The crowd roared their approval as five-time champion Federer held serve at the start of the deciding set and it soon became clear Djokovic would have not be allowed to run away with it.
In fact, the 24-year-old could do nothing but applaud a stunning Federer winner at the start of the seventh game, and that proved to be a crucial moment.
Djokovic, the man who had lost only two of 64 matches this season, cracked. A netted forehand was followed by a clear double fault and then a wayward forehand to hand Federer the break and leave him serving for the match.
But that was not the end of the story. A stunning return from Djokovic on his opponent’s first match point looked like just a parting shot until Federer missed a second chance and then served a double fault on break point.
The Serb was inspired and Federer had no answer as he surrendered his serve for the second time in a row to leave Djokovic serving for the match, and he made no mistake.
The 24-year-old led the crowd in a mass dance after hailing the victory the best of his stellar year and one of the best of his career.