14-time grand slam champion, Djokovic, won the first set 7-6. "Maybe I'm not crying, but still I'm really happy", he told reporters later.
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.
Djokovic's fourth straight win over Federer and 25th in 47 contests sends him into the final against unseeded Russian Karen Khachanov, who has never played in a Masters final.
Earning his fourth straight win over a top-10 player this week, Khachanov, whose muscular game resembles that of his childhood hero Marat Safin, the last Russian victor in Paris, picked up the biggest title of his burgeoning career.
The 20-time Grand Slam champion lost the first set despite having held set point in the tiebreak and had Djokovic in trouble in the final set when the Serb received a code violation at 4-4 for chucking his racket away in disgust after the Swiss had saved two break points.
Djokovic overcame Roger Federer in an energy-sapping thriller that lasted over three hours in Saturday's semi-finals, and the Serb began to look tired as he dropped serve to a fall behind early in the second set.
But world number 18 Khachanov, unbeaten in three previous finals, hit back in the very next game as Djokovic dragged a forehand into the tramlines, down break point.
"Next to the match I played against (Rafa) Nadal in the Wimbledon semis, this was definitely the most exciting match I've played this year, and probably the best quality match that I was part of".
Still, the Wimbledon and U.S. Open champion has plenty to feel good about after a 22-match winning streak, and he remains a favourite for the season-ending ATP Finals in London, beginning November 11.
"All the credit to him". Luthi has been following Federer on the Tour for more than a decade, and he said: 'I have been working with Roger Federer for 11 years and the way to motivate him has also evolved. "I know I have fans here, I can't complain", Federer said. "In this match I think it was really intense the first couple of games and then at 4-4 when it more pressure was coming, I could break him, and then I took the lead".
"I'm satisfied of course and I'm going to be No. 1 tomorrow officially".
"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".