British number three Bedene battled back to square the match after losing a first-set tie-break, but was edged out in the decider to lose his second-round match 7-6 (7/4) 5-7 6-4.
Bedene, up to 46 in the world rankings after his recent run to the third round at Wimbledon, had cruised through the first round in Hamburg with a 6-1 6-2 victory against Jose Hernandez-Fernandez on Wednesday.
David Ferrer through to second round in Hamburg
But he found rising star Khachanov, 21, a different proposition and although he caused the world number 32 problems, he slipped to defeat in two hours and 27 minutes.
Khachanov will now play Argentina's Federico Delbonis in the quarter-finals.
Bedene cruises into last 16 in Hamburg
Verdasco handed two-month doping ban after positive test
Share this article