Zverev had survived successive five-setters in the previous two rounds, including saving a match point against Damir Dzumhur in the last 32, but his fatigued legs and blistered feet again worked overtime to carry him over the finishing line against Khachanov.
After looking down and out for much of the third set, Zverev was fired up by a code violation for being coached from the stands by his father Alexander Sr. midway through the fourth set and he vented his anger by instantly breaking for a 4-2 lead.
He was fortunate to survive a break point when serving for the set at 5-3, with Khachanov's blazing forehand clipping the net cord and bouncing just millimetres behind the baseline, before drawing level at two sets apiece with an ace.
Despite calling on a trainer to treat blisters on his left toes before the start of the fifth set, the world number three zipped around with ease to break in the opening game of the decider and finished off the 38th-ranked Russian after three-and-a-half hours of pulsating action.
Zverev will next play face seventh seed Dominic Thiem in a quarter-final blockbuster.