N.C. State rallied from a halftime deficit for the second week in a row, scoring touchdowns on five consecutive possessions during a stretch that began late in the second quarter.
Thornton capped the spurt with a 23-yard touchdown run up the middle, breaking two tackles en route to giving the Wolfpack their final margin with 3:59 to play.
Taylor Heinicke completed 35 of 49 passes for 274 yards and two touchdowns for Old Dominion (1-1).
Ray Lawry rushed for 71 yards and three touchdowns for the Monarchs, who dropped to 0-4 all-time against opponents from the Atlantic Coast Conference.
The first meeting between the teams featured five lead changes, including three in the third quarter.
It was familiar territory for the Wolfpack, who overcame a 10-point deficit in the fourth quarter to defeat Georgia Southern 24-23 last week.
Old Dominion piled up 306 total yards in the first half, racing out to a 21-10 lead with touchdown drives of at least 10 plays and 75 yards on three of its first four possessions.
The lone exception was an interception by Heinicke that N.C. State converted into a touchdown five plays later. Thornton capped the drive by scoring on a 2-yard run to give the Wolfpack a 10-7 lead, their lone lead of the first half.
The Monarchs answered with two short touchdown runs by Lawry before N.C. State cut the margin to 21-18 on a 7-yard touchdown catch by Matt Dayes and a two-point conversion just before halftime.