Djokovic had triumphed when the two old rivals met in the semi-finals of the Paris Masters on Saturday and they produced another gripping encounter across the English Channel at London's O2 Arena.
Once again Djokovic had the upper hand as the world number two began his bid for a third crown at the season-ending tournament by repeating his victory over Swiss great Federer in last year's final.
Neither player was at their best, with Federer making 45 unforced errors and Djokovic 33, but the erratic quality of the tennis couldn't detract from the drama.
"It was a big challenge physically. Only 48 hours ago, I was playing in Paris so to be able to beat Roger is incredible," Djokovic said.
"I have to enjoy the win and then think about the recovery. The good thing is there is a day off.
"I'm going to try and recharge my batteries mentally and physically and get ready to play Juan Martin del Potro."
Federer added: "Novak proves time and again he is one of the best defensive players we have ever seen.
"But I didn't think it was as high quality a match as the final last year.
"Novak struggled at times and so did I. It was the first match so there were always going to be errors."
Since losing the US Open final to Rafael Nadal in September, Djokovic has played like a man on a mission to erase the bitter aftertaste of that defeat.
This was his 18th consecutive victory since trudging off court as a loser in New York, a run that has brought him titles in Beijing, Shanghai and Paris, and another crown in London looks a distinct possibility.
In contrast, after one of the worst campaigns of his illustrious career, Federer has tumbled to sixth in the world rankings and will fail to finish the year as a member of the world's top four for the first time since 2002.
Federer's decline can be measured by his failure to reach a Grand Slam final this year -- the first time he hasn't appeared in one of the four major finals since 2002.
Federer, a 17-time Grand Slam champion has only won one title this year in Halle, with many pundits writing off the 32-year-old as a fading force.
Djokovic had risked irking Federer further in the build-up to the match by claiming the Swiss star was "moving maybe slower than he used to".
And evidence of both Federer's genius and his failings were on show in a tight first set, with the first break point not arriving until the ninth game when the Swiss squandered a chance to land the first blow with a forehand down the line that dropped wide.
That proved a crucial miss as Djokovic capitalised on his escape, producing a brilliant return of serve that drew an error from Federer and brought up two set points.
Federer saved the first but a wayward forehand gifted the first set to the Serb.
Despite being in command, Djokovic looked oddly agitated and unsure of himself after failing to convert two more break points in the second game of what proved an error-strewn second set.
Federer broke for a 3-2 lead and Djokovic immediately levelled, only to drop his serve again in sloppy fashion.
When Federer had his chance to serve out the set at 5-4, he wasted a set point and allowed Djokovic to break once more.
There was no surrender from Federer though and he won the tie-break emphatically to take the match to a final set.
Given he had played the Paris Masters final just 48 hours earlier, Djokovic could have been forgiven for flagging, but he showed tremendous energy to break twice for a 5-1 lead in the decider before serving out a hard-fought win.