Khachanov digs deep against Sonego to reach French Open last eight
The Russian 11th seed looked out of sorts in the opening set before finding his range on Court Suzanne Lenglen, using his forehand to devastating effect.
Sonego never recovered from wasting a 4-0 advantage in the third-set tiebreak, which proved to be the turning point of an entertaining encounter.
Khachanov will now face either two-time Roland Garros champion Novak Djokovic or Peru's Juan Pablo Varillas.
"After the first set and a half, I was thinking, what am I doing here, he was hitting all over the place so I decided all I could do was fight," said the Russian, who made it to the last four in the last two Grand Slams in New York and Melbourne.
Sonego was strong on serve, not facing a single break point, as he outplayed his opponent in a one-sided opening set that he sealed when Khachanov netted a crosscourt forehand.
Khachanov brought his best game into the second set to level the contest, which went to a tiebreak in the third.
Sonego cruised to a 4-0 lead, only to blow it away and fall 5-6 behind. He saved the first set point but served a double fault on the second.
Losing the set broke Sonego's momentum, and his game, while a pumped-up Khachanov went on to seal the match by whizzing through the fourth set, prevailing on the first match point.