Arizona quarterback Noah Fifita threw for 302 yards and five touchdowns, but he also threw two interceptions.
The Trojans trailed 17-0 at halftime, but they came back to tie the game at 31-31 in regulation.
The game went to triple overtime, where USC scored a touchdown on its first possession to win the game.