The 20th-ranked Querrey kept the Americans' hopes of winning a match on the opening day of action alive when he raced through the fourth set to even the score to two sets apiece.
In the final set, Querrey broke the 44th-ranked Troicki's serve on a second break point in the ninth game when the Serbian netted a forehand. Troicki saved the first set point with an ace.
"Boise turned out nicely for us, and we're very happy with the energy in the building," U.S. captain Jim Courier said of the crowd, particularly during the second match, which lasted 3 hours, 19 minutes. "The atmosphere was Davis Cup."
In other Davis Cup quarterfinals, Italy and Canada were tied at 1, as were France and Argentina, while the defending champion Czech Republic was up on Kazakhstan 2-0.
Querrey started the match strong, taking a 5-2 advantage. But when serving for the match at 5-3, he double-faulted away the ninth game and then was forced to take the set in a tiebreaker. Troicki, however, was not undone by losing the first set. He went on to win the next two sets.
The Serbian barely seemed a part of the fourth set, winning only the fourth game, which he closed out with a second-serve ace.
"In the second and third set, I had too many errors," Querrey said. "But in the fourth set, I got an early break and I felt I had the momentum back in my favor. I played a great fourth set and a great fifth set.
"The crowd helped a ton and my teammates helped a ton and we're back to even."
Courier was impressed with how Querrey kept his composure.
"When we lost the first match, the pressure shifted onto Sam's shoulders," Courier said. "Sam was relaxed in the locker room, confident on the court and kept his head the whole way through."
Earlier, Djokovic initially trailed Isner in the first set when the American broke serve in the third game of the first set. When Djokovic recouped the service break in the sixth game, he gained total control of the match.
"There's a lot at stake because there's a lot of emotions and you're playing for your country," Djokovic said. "You really want to start well and want to bring the first point to Serbia."
Although the 6-foot-9 Isner posted 17 aces, his serve let him down. Isner put only 54 percent of his first serves into play in contrast to Djokovic, who capably put 77 percent in play.
Isner presented Djokovic with four break-point opportunities in the two-hour match, and the Serbian made good on all four.
Djokovic had 10 unforced errors to 37 for Isner, which also allowed the Serbian to dominate throughout all but the first few games of the match.
"I think after the first set, he became a lot more comfortable," Isner said of Djokovic. "He started playing really well."
Isner was ahead by a service break in the initial stages of the first set, breaking Djokovic in the third game when the Serb hit an unforced forehand error.
"I was a little bit nervous at the start and was being too cautious with my play and not really taking the ball early," Djokovic said. "That resulted with being a break down."
But Isner couldn't hold on to the advantage, surrendering his serve in the sixth game.
Isner had won his five previous tiebreakers in Davis Cup action but couldn't keep that streak going. Djokovic took advantage of his third set point in the tiebreaker with a forced backhand return error.
"I think I could've served better and I didn't," Isner said. "The mistake on my part is I had to do my best to that little lead I had and I let him back in it.
"To do that against this guy is not a good recipe."
In the second set, Djokovic secured service breaks in the third and seventh games. And in the final set, Djokovic broke Isner's serve in the 11th game. Djokovic won the last 12 points of the match.
"After I got the crucial break (in the first set), then I served really well," Djokovic said. "After that, it was a great performance."
The lineup for Saturday's doubles is top-ranked Bob and Mike Bryan for the U.S. and doubles specialist Nenad Zimonjic with unheralded Ilija Bozoljac for the Serbians. However, there is a suggestion that Djokovic might team with Zimonjic. The captains have until an hour before the doubles match to switch their players.
But Courier wasn't worried as to whom the Serbians would play.
"At 1-1 when you have the Bryans," he said, "it almost feels a little bit like you have the lead."