She will play the unseeded Ashleigh Barty in the final today, after the 21-year-old Australian upset sixth seed Garbine Muguruza, the former French Open champion, 3-6, 6-4, 6-3 in the other semi-final yesterday.
Federer's forehand victor at 4-4 secured the only break of the match and he served out to wrap up victory in one hour and 30 minutes.
Federer and Khachanov traded breaks in the first two games but Federer made amends by grabbing a second one to restore his advantage and clinch the first set on his second set point.
"I thought it was extremely close, especially that second set", Federer said afterward.
"I think it was a very good week for me again making the finals here".
Federer saved four of the six break points he faced overall, while converting three of his five opportunities.
Federer, who hit 11 aces and 32 winners, said facing Khachanov, who he has never played previously - at least competitively, will present a new challenge for him. It was quite quick, and usually in doubles the points are a little bit shorter.
Speaking at the post-match presentation, Federer said: "It's been a hard year - we had a lot of practice, a lot of training, a lot of rehab to do, so it's nice to be back on the match courts and it feels great".
Federer has yet to drop a set in Halle where he was playing his 13th consecutive semifinal on Saturday. He improved his all-time record at the tournament to 58-6 and is 23-2 on the season.
Petra Kvitova secured the best win of her comeback so far, beating Kristina Mladenovic to reach the semi-finals of the Aegon Classic in Birmingham.
Eight-time champion Roger Federer and Alexander Zverev clash in a battle of generations on Sunday, June 25 (Monday in Manila time) in the final of the Halle tournament with the Swiss superstar looking to make a mockery of their 15-year age gap.
Both finalists are seeking a fourth title on the season, and neither has lost in a final in 2017.