Anderson reached the top 10 in October 2015, soon after making his first US Open quarter-final, and though injuries affected him past year, he is closing in on the world's top 20 once more.
Anderson made his first grand slam quarter-final at the US Open two years ago but has been hampered by injuries since, dropping as low as 80 in the rankings in January.
Querrey had beaten Anderson en route to his own first major final-four outing at Wimbledon this year, but Anderson got the better of him this time in a battle of big servers.
"(I'm) pretty happy", Querrey said. "Only one guy can go through, and Kevin's pretty tough".
Kevin Anderson celebrates "incredible" win over Sam Querrery
Querrey appeared in control of the tie-break at 5-2 ahead, only for Anderson to reel off five consecutive points - the American sending a backhand return long on set point.
"Losing the second set was really tough but I played each point at a time and it paid big dividends for me today". "He's so overly aggressive". "You know, I have put in a lot of work". It's nearly tougher, it would have been better off losing that tie-break nearly 7-1 than coming so close to actually being two sets to love up. "You know, it just happened really quick, I guess".
"It's a fantastic feeling, but at the same time I feel like I want to keep [going]".
Querrey made a match of it when he converted his 8th set point in a dramatic second-set breaker to level at a set apiece, but before the thin but vocal NY crowd could rally Querrey to higher heights Anderson took the third set on the strength of a break in the sixth game.
It was a closer match than the scoreline suggested but, as in his fourth-round victory over Denis Shapovalov, Carreno Busta played the big points superbly.
"After being 6-1 down, obviously it was a tough point to lose that 6-all point", Anderson said. "Fortunately, I was able to win a couple more points than him tonight".