Kelly passed for 226 yards on 20-of-27 efficiency with a TD toss and also rushed for 97 yards on 22 carries, scoring the game's first touchdown on a 7-yard run.
ASU led 35-13 at halftime but had to hold on as UCLA reeled off 20 of the next 23 points.
With the victory, the Sun Devils (9-2, 7-1 Pac-12) clinched the Pac-12 South Division title and berth in the conference championship game Dec. 7 against Stanford.
The Bruins (8-3, 5-3) had their three-game winning streak snapped as Brett Hundley went 18-of-26 through the air for 253 yards and a pair of touchdowns.
Notable deaths of 2014 [PHOTOS]