Khachanov, the victor at last month's Kremlin Cup in Moscow, demolished out-of-sorts fourth seed Alexander Zverev of Germany 6-1, 6-2 while Thiem knocked out defending champion Jack Sock, the 16th-seeded American, 4-6, 6-4, 6-4.
Djokovic, who had complained of competing with flu-like symptoms in his previous matches this week, looked proud and relieved to repel a wonderful challenge from Federer, who appeared close to his imperious best.
However, the 14-time major victor roared back, breaking twice in the second set to level the contest.
"This is my best match of the year, that's for sure", Djokovic said, addressing the crowd in French.
Cilic, who defeated 31-year-old Djokovic in the final at Queen's Club in the summer, was a break ahead again for a 2-1 lead in the decider.
Cilic and Thiem sealed the last two spots for the season-ending ATP Finals in London, starting on November 11.
Trump veut mettre fin au droit du sol — Citoyenneté américaine
Donald Trump a même affirmé qu'il comptait se passer d'un amendement constitutionnel pour supprimer le droit du sol . Des "villes de tentes" à la frontière avec le Mexique seront construites et les migrants devront attendre.
The missed opportunity proved costly when Federer conjured up just a second break point of the contest at 6-5, converting in style as he gambled on Djokovic going cross-court before batting a victor down the line to force a decider.
But Djokovic is unquestionably the best in the world right now: he has played 32 matches since June, and won 31 of them. Djokovic is now on a 22-match winning streak, and will aim to move level with Rafael Nadal on a record 33 Masters titles.
Federer, the 2011 champion in Paris, last beat Djokovic at the ATP Tour Finals in 2015 and was comprehensively beaten by his long-time rival in the Cincinnati Masters final on the eve of the US Open this year.
Coming into the week, Khachanov had a 3-16 record against players ranked in the world Top 10.
"For the most part I can be happy, my level was good, but losing is never fun", said Federer.
Khachanov, who won the Kremlin Cup in Moscow last month, broke fourth-seeded Alexander Zverev's serve six times in a 6-1, 6-2 win.
"Everything is fine between us and there is no problem". Even though the latter's serve was not broken once, it was still not enough for the 37-year-old, whose nerve failed him in an anti-climactic final tie-break in which he served a double fault and made two careless groundstroke errors.
The world number 18, who needed just over an hour to beat Zverev, will face Dominic Thiem in the semi-finals.