Ryan Colburn connected with Jamel Hamler from 19 yards to get the Bulldogs (8-4) within 52-51, and coach Pat Hill elected to go for the win rather than take his chances in overtime.
Colburn dropped back under heavy pressure and his pass was tipped, falling into the hands of the 350-pound Cunningham, who leaned into the end zone.
Ryan Mathews ran for 173 yards and three touchdowns for Fresno State, which had not led since early in the second quarter. Colburn finished with 183 yards and two touchdowns passing.
Mikel LeShoure ran for 184 yards on 11 carries for Illinois (3-9). He scored three touchdowns.