Cook's 9-yard touchdown pass to Josiah Price early in the fourth quarter put the Spartans ahead to stay at 27-24 and Jeremy Langford's 26-yard run with 2:16 left iced the Big 10 championship for MSU (12-1).
The Spartans grabbed back the lead after the Buckeyes had reeled off 24 unanswered points and now will advance to the Rose Bowl for the first time in 25 years, where they will face Pac-12 champion Stanford.
The win snapped Ohio State's 24-game winning streak and ended the Buckeyes' hopes for a spot in the BCS championship game against Florida State.
Braxton Miller was held to just 101 passing yards on 8-of-21 efficiency for Ohio State (12-1), which lost for the first time under Coach Urban Meyer.
Miller gained 142 rushing yards with two touchdowns on 21 carries.
Members of Congress to keep receiving porn magazine
Rosie O'Donnell unveils nearly 50-pound weight loss