Hewitt, the former top-ranked player in the world, double-faulted twice in the third-set tiebreaker, including match point. The Australian has 28 career titles and beat Querrey in two previous meetings.
"A match like that, to grind through it, makes me feel pretty good," said Querrey, his right elbow and knee wrapped in ice. "It was a high-quality match. He's a lot better than his ranking. A couple of double faults was all that separated us in the match."
Querrey, ranked No. 20, is trying not to look too far down the road, setting his sights on reaching a Grand Slam quarterfinal and breaking into the top 10. He reached No. 17 in early 2011 before elbow surgery derailed his climb.
It's also a goal to be the top-ranked American, a title currently held by good friend John Isner, the No. 2 seed in San Jose.
"I want to do it based on results," Querrey said. "Not where John fades for some reason, but that I won a lot of matches and really deserve it."
Winning two matches for the U.S. Davis Cup in a first-round win over Brazil has certainly endured him to his fellow Americans.
"That was probably the most nervous I have ever been for a match," said Querrey, who has won seven of his first nine matches this season on the ATP tour. "I was playing for the whole country. I wasn't playing just for me."
In other matches, Belgium's Xavier Malisse, seeded eighth, squeezed past Australia's Matthew Ebden 5-7, 7-5, 7-6 (1) in a match that lasted almost 2½ hours; and American Steve Johnson reached his first career quarterfinal with a 6-3, 6-3 victory over American qualifier Tim Smyczek.