The Huskies (10-4, 2-0 in Pac-12 play) trailed, 66-44, with 14 minutes 18 seconds left before rallying. The Trojans (12-3, 1-1), who had won seven games in a row, played the final 16 minutes without junior guard Julian Jacobs, who sprained his left ankle.
"That was probably the defining moment for their team, because that kind of slowed them down," said Andrews, the only senior in a starting lineup that features four freshmen.
Even without Jacobs, USC took an 85-78 lead on a layup by Nikola Jovanovic with 2:12 to play but the Huskies scored eight consecutive points for an 86-85 lead.
After Elijah Stewart missed a shot for USC with seven seconds left, Andrews was fouled on the rebound and made the second of two free throws to put Washington ahead, 87-85, with 4.2 seconds left.
Katin Reinhardt missed an off-balance jump shot with one second left and Stewart's potential tying putback was ruled after the buzzer upon review.
Dejounte Murray had a career-high 29 points for the Huskies, including 19 in the second half, and Andrews finished with 24.
Bennie Boatwright, Jacobs and Jordan McLaughlin each had 15 points for the Trojans.
"After Julian Jacobs was injured, we had trouble with their pressure, with the full-court press," Coach Andy Enfield said. "They sped the game up and that's fine when we have Julian in the game, because that's how he likes to play. When he was playing, we were controlling the tempo."
USC, which led, 46-36, after the first half, went ahead, 66-44, on Reinhardt's basket from the top of the key with 14:18 remaining. Washington responded with 12 consecutive points.
USC committed 12 of its 21 turnovers in the second half. Forced to take over the bulk of the ball-handling, McLaughlin was pressured into four second-half turnovers, including two in the final minute.
"When he [Jacobs] went down, we were able to kind of corral McLaughlin and get someone else to bring it up and not get them into the offense, and that's how we turned up the tempo of the game when they kind of wanted to slow it down," Andrews said.
The second-half comeback countered a cold-shooting first half by the Huskies, coming off a 96-93 victory over UCLA in double overtime Friday.
"I don't know if it was the emotion of the double-overtime game the other night but we were just flat," said Coach Lorenzo Romar, whose team has forced double-digit turnovers in every game this season, including 25 against UCLA. "We were a step slow defensively. Now USC is good and they will exploit you if you are a step slow, but we were a step slow on the defensive end."
The Huskies, who made only nine of 36 shots in the first half and had only five assists, stayed as close as they did because of their free-throw shooting. USC was called for its 10th team foul with 5:42 left and the Huskies scored 14 of their final 19 points on free throws.