Swiss icon Federer earned a brilliant 6-4 6-3 victory at the O2 Arena in London on Thursday to join Dominic Thiem in advancing to the semi-finals at the Serbian's expense.
It was the 19-time grand slam champion's first win against Djokovic – whose defeat meant Rafael Nadal will end 2019 as the world number one – since 2015, with the 32-year-old having been triumphant in each of their previous five encounters.
The most recent of those saw Djokovic stave off a championship point before clinching the Wimbledon title following a tie-break at 12-12 in the fifth set.
Asked what he did differently on Thursday, Federer replied: "I won match point, I guess! It was so close at Wimbledon. It was a privilege to play that match, so many ups and downs.
"I thought I played an incredible tournament … and it's just a point or a shot here and there that made the difference and he got it.
"You move on, try harder next time and hopefully luck goes on your side. I stayed calm, I played great until the very end and I couldn't be more happy right now.
"[It was a] great atmosphere, great opponent. It was definitely incredibly special. I enjoyed it from the beginning.
"I played incredible and I knew I had to because that's what Novak does. I was able to produce. It was definitely magical. You guys [the fans] made it super special, I can't thank you enough."
Federer bounced back from losing his opening round-robin match to Thiem by beating Matteo Berrettini in straight sets and the 38-year-old stepped up his game again to overcome Djokovic.
"You always play better as the tournament goes on, that's why I think we played as well as we did at Wimbledon as well," said Federer, who suffered a semi-final defeat to Alexander Zverev in last year's ATP Finals.
"Dominic Thiem has been supreme in our group, made life difficult for both of us and put us in the situation that only the winner goes through.
"There was a lot riding on the match and I came out and I think I served great, had great anticipation, a clear game-plan and it worked great – hopefully not for the last time against Novak.
"I'm happy to stick around. Hopefully I'll go a step further than last year, I played a good match against Zverev last year but he was unreal."
For in-depth, objective and more importantly balanced journalism, Click here to subscribe to Outlook Magazine