Djokovic had not been beaten since Stefanos Tsitsipas knocked him out of the Rogers Cup in August, but the new world number one came unstuck against another rising star on Sunday.
Earning his fourth straight win over a top-10 player this week, Khachanov, whose muscular game resembles that of his childhood hero Marat Safin, a Russian three-times victor in Paris, picked up the biggest title of his burgeoning career.
Djokovic, who will replace an injury-plagued Nadal at the top of the rankings on Monday, now leads Federer 25-22 overall and has not lost to the Swiss since 2015.
The 1.98m Khachanov secured a break for 2-1 with a crunching backhand pass down the line that Djokovic could only net on the half-volley.
Federer faced two break points in the opening game of the second set as Djokovic threatened to take control, but matters stayed on serve until a few minutes of uncharacteristic sloppiness from the Serb gave Federer a chance to level, which he took with a fizzing forehand victor.
The Russian fully demonstrated his confidence later on, finishing quadruple breaks for a 6-1 second set victory.
Serbia's Novak Djokovic (L) and Switzerland's Roger Federer shake hands at the end of their men's singles semi-final tennis match on day six of Paris Masters tournament in Paris, on November 3, 2018.More news: Charles and Camilla receive official welcome as their West African tour begins
More news: Blizzard announces long-awaited Warcraft 3 remaster at Blizzcon
More news: Alec Baldwin Arrested After Fight Over Parking Spot
It was the first Masters title to be won by the 22 year-old Russian and his third ATP title this year.
"I watched (Safin's) matches but later, not at the age of eight", he said.
"I am going to watch that match, it could be very interesting", said a smiling Khachanov in a courtside interview.
He rose to a career-high No3 in the rankings in January, and has won at least one title for the last 11 years.
He improves to 4-0 in ATP World Tour title matches, having also lifted trophies in Marseille and his home capital of Moscow this year.
The Austrian served out the match and clinched victory on his first match point when Sock hit a big forehand long. "I'm confident and I'm in the final, so I'm really happy about it".
"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. But nevertheless I think I've got nothing to lose", Federer said.