Second-seeded Nishikori set up match point with a blistering backhand down the line and won with a forehand smash, securing his third straight win in seven matches against the unseeded Querrey.
"With the strong wind and playing against a big server like him, I needed a lot of concentration," Nishikori said. "After winning the tiebreak, I was able to settle down and relax more in the second set."
"It was a tough match and after losing to him last year, I am happy to have gotten through," Wawrinka said. "I tried to mix up my play in the third set to move him around more. I have one day off now and will train to be ready for my next match."
The 25-year-old Nishikori, who is bidding for his third Japan Open title, has now reached the quarterfinals or better at 13 of his past 16 tournaments.
There were no break point opportunities in the first set, and Nishikori won five of the first six points in the tiebreak.
The sixth-ranked Nishikori broke Querrey to go up 2-1 in the second set and never let his opponent back in the match.
Cilic outlasted Donald Young 7-5, 5-7, 6-4 in a first-round match.
Third-seeded Gilles Simon of France also advanced to the quarterfinals with a 6-4, 6-2 win over Jiri Vesely of the Czech Republic. Simon will face Luxembourg's Gilles Muller, a 7-6 (3), 7-6 (5) winner over Jeremy Chardy of France.