The 36-year-old Federer had his service broken by the 21-year-old Khachanov in the opening game, but rebounded to break back immediately and won the opening set in 29 minutes.
Federer was stretched by Khachanov, particularly in the second set when the pair traded powerful groundstrokes.
The world No.2 closed out the first set in 29 minutes, before fighting off a fearless challenge from Khachanov to take the match 6-3 7-6 (8). "It's good to be free-swinging and young, like he is". Physically I'm feeling 110 percent, so it's the ideal start to 2018.' Goffin loves Hopman Cup: 'It is something special to play for your country it is something different from you personal career.
Tuesday's other Group B clash saw Japan face the United States, and it was the latter who prevailed thanks to an injury to Naomi Osaka.
Sock was down 7-6 (7-1) 1-1 against Yuichi Sugita when he called it a day after getting treatment on his right hip following a fall in the first set. He was forced to retire at 1-1 in the second set after losing the first set 7-6 (1).
Federer claimed his first Hopman Cup title in 2001, teaming with fellow teenager Martina Hingis to beat Americans Jan-Michael Gambill and Monica Seles 2-1 in the final. "I feel much more in a rhythm".
Osaka was replaced by 19-year-old Maddison Inglis in order for play to go ahead, but the US were awarded straight-sets victories in the matches she was set to be involved in: the women's singles and mixed doubles.
The US were given the 2-1 win in today's tie against Japan, despite neither team being able to field a full team for the mixed doubles.
The Group B tie ended with an exhibition mixed doubles match featuring the return of 52-year-old former Wimbledon champion Pat Cash to the court to team with Vanderweghe, who he coaches. He mixed up the play well, so it was a tough match for me. "He (Sock) is confident he'll be fine".
But there were no such dramas for the elder statesman Federer, who 12 months ago stunned the tennis world by ending an nearly four-year Grand Slam drought with a victory at the Australian Open, after also preparing at the Hopman Cup.