Russia's world No.50, who lost the opening match in his three Open tune-up events, was far from spectacular but did enough on a day when his Canadian opponent's energy level appeared to drop as the match wore on.
"I saw that maybe he had some physical issues ... it's part of our sport," Khachanov said after advancing 6-7 (5-7) 6-3 6-2 6-2 on Thursday.
"I wish him, let's say, to feel better, speedy recovery if he's injured, I don't know.
"What I can say from my side is I tried to give my best performance, fighting, fighting. I'm super happy to get this win."
The result meant Khachanov has now reached the third round of all four grand slam tournaments in a single calendar year for the first time.
Khachanov, who made a run to the US Open semi-finals in 2022, broke Auger-Aliassime's serve seven times and saved seven of the nine break points he faced en route to securing only his second top-10 win at a grand slam.
Auger-Aliassime looked ready to whip through the first set after consolidating a break for a 3-0 lead but was suddenly undone by a string of errors, allowing Khachanov to pull ahead before the Canadian broke for a second time to get to 4-4.
But Khachanov showed he was ready for a fight and twice held at love while serving to stay in the set before falling short in the tiebreaker, which ended when he sent a backhand long after chasing down an Auger-Aliassime volley.
In the second set it was Khachanov's turn to jump ahead 3-0 but he never looked back, ultimately closing it out on his serve after coming back from 15-40 down.
Khachanov cruised through the third set, breaking at love to reach 4-1 en route to wrapping up the frame on his serve and leaving Auger-Aliassime with a long road back on a day when little was going right for him.
The Russian, displaying full confidence in his swings, wasted little time in the fourth set, opening up a 4-0 lead that appeared to drain the energy and strength from Auger-Aliassime, who looked a shell of his normal self.
Khachanov went on to close out the encounter with a four-point hold, the final blow coming with a massive serve that Auger-Aliassime failed to return.
Up next for Khachanov, who has only reached two quarter-finals this year, will be Frenchman Benjamin Bonzi, who eliminated Peruvian Ignacio Buse 6-2 7-6 (7-4) 6-0.
Gael Monfils bid adieu to grand slam tennis with a hard-fought loss to Learner Tien in the second round.
The 40-year-old Frenchman, who is planning to retire at the end of the year, was knocked out 6-3 6-4 6-3 by Tien, who at 20 is half Monfils' age and asked for and received his autograph after beating him in Montreal last month.
Taylor Fritz delivered another commanding performance to brush aside Mattia Bellucci 6-0 6-1 6-1 and reach the third round, extending his emphatic start to the tournament without dropping a set.
Fritz is among a handful of contenders looking to end a 23-year American wait for a men's grand slam singles champion after Andy Roddick's Flushing Meadows triumph and the ninth seed has strengthened his position after his first two matches.
"I thought I played really well today. I came out and felt good from the beginning ... I was very focused the whole match," Fritz told reporters after his 98-minute demolition job.