Dewayne Dedmon added 13 points and eight rebounds and J.T. Terrell had 12 points for the Trojans (12-13, 7-5 Pac-12), who have won four in a row. USC had lost nine of its previous 10 games at Maples Pavilion.
USC also swept the season series, having beaten Stanford 71-69 on Jan. 3 in Los Angeles.
Josh Huestis led the Cardinal (15-10, 6-6) with a career-high 22 points. Chasson Randle scored 16 points, including four 3-pointers, but missed a 3 attempt at the buzzer for Stanford.
Dwight Powell finished with 17 rebounds, the most by a Cardinal since Brook Lopez had 15 boards in 2008.