After both players held to love, Khachanov showed no nerves - even though he was in his first Masters final - and served out the match.
Earlier, Khachanov continued his strong recent form by beating Dominic Thiem 6-4 6-1 in just 71 minutes.
Khachanov became the third different first-time victor of a Masters tournament this year - joining John Isner and Juan Martin del Potro- and denied Djokovic a fourth title in a row ahead of his return to world number one on Monday. He was given a huge ovation by the crowd after his win.
Going into the event, Khachanov had won just three of 19 encounters against players in the top 10 but claimed a fourth such scalp in a week after snapping Djokovic's 22-match winning run. But throughout the match, it was Khachanov who controlled the baseline, landing his heavy groundstrokes deep in the court to push the Austrian back and control the baseline. "I have an enormous amount of support around the world".
"I didn't unfortunately. But I don't want to talk about that", he said.
When winning the opening set, Djokovic now has an 18-1 record against Federer.
After also being taken to three sets by Marin Cilic in Friday's quarter-finals, Djokovic's semifinal finished at around 8 p.m. Federer's down the T serve was returned well by Djokovic straight in the middle and the Swiss ace took his time before whipping it to Djokovic's right to what looked like a sure victor. "I started to move him and maybe he didn't expect that I could do it after being down 3-1 with a break".
"I watched [Safin's] matches but later, not at the age of eight", he said.
"I'm satisfied of course and I'm going to be No. 1 tomorrow".
"To finish my season like this is a dream", Khachanov told the crowd in the Bercy arena, explaining that Djokovic had always been an inspiration to him.
Rather than focus on his first defeat since losing to Stefanos Tsitsipas in the Rogers Cup back in August, Djokovic chose to highlight the performance of his conqueror. "Put me under big pressure from the first ball, actually", Thiem said. "I mean, I had a most incredible last five months of the year".
The sixth-seeded Thiem next faces unseeded Karen Khachanov of Russian Federation in their first career meeting. He took exception to some comments made in Khachanov's box and spoke to his opponent at the end of the first set.
A few years ago, he told me that I did not need to show him when he was doing the right thing during a match.
"The second thing is after some tough loses against top guys like Rafa in NY, I think they push me to the limit and even to work more harder".