After Ball State had grabbed a 20-16 lead with 1:33 remaining on Jahwan Edwards' 1-yard run, Knighton marched the Red Wolves (8-5) 80 yards on 16 plays, capped by his 13-yard scoring strike to Allen Muse with 32 seconds left.
Ball State's Keith Wenning got the Cardinals to within field-goal range on their final possession, but Scott Secor's 38-yard try was blocked on the last play of the game.
Knighton completed 15-of-20 passes for 115 yards, a TD and an interception, and also ran for 97 yards on 19 carries as the Red Wolves won a second straight GoDaddy Bowl under interim Coach John Thompson.
Wenning made good on 23-of-44 passes for 215 yards, a score and a pickoff for the Cardinals (10-3), who were seeking their first-ever bowl win.
Edwards finished with 146 rushing yards on 28 carries.