Cook finished 15-of-16 for 208 yards, setting a Michigan State (7-1, 4-0 Big Ten) record for passing efficiency just a week after he was grilled for failing to move the ball against Purdue.
Tailback Jeremy Langford had 104 yards on 22 carries and two touchdowns for the Spartans.
The Michigan State defense came into the game ranked first in the nation in total defense at 228 yards a game, and looked even better Saturday, holding Illinois to just 128. That included 25 yards on the ground.
Illinois had been scoring 35.3 points a game.
Almost half of Illinois' offense came on the game's opening drive, a 12-play, 53-yarder that ended with a field goal and a 3-0 lead that pumped a little optimism into a homecoming day crowd.
If all you saw was the final score, you might not believe Michigan State didn't take over at that moment. But the Spartans let Illinois hang around, taking their time before finally grinding them down.
The backbreaker came slowly, agonizingly, over a little under nine minutes of the second quarter.
What looked like it was about to be an Illinois lead turned into a big 11-point edge for the Spartans. And, no surprise, their defense triggered it.
Michigan State stopped the Illini twice from its own 1-yard line midway through the quarter, stuffing running back Josh Ferguson and then, on fourth down with the homecoming crowd at its loudest, tight end Jon Davis just short of the goal line.
The Spartans took over at the 1 with 8:17 left in the quarter and ground their way oh-so slowly upfield.
More than eight minutes later, Cook faced a third-and-25 at the Illinois 29 after a pair of sacks. Rolling to his right to avoid more pressure, Cook slung the ball toward the front corner of the end zone where wide receiver Bennie Fowler waited behind a pair of Illinois defensive backs. One of them, freshman cornerback Jaylen Dunlap, slapped the ball up in the air and then appeared to tip it again before it looped up and over the goal line and into the hands of Fowler, falling backward for the touchdown.
Fifteen plays, 99 long yards and 8:08 of clock time gone.
Michigan State was suddenly up 14-3 with nine seconds left in the half. And an Illini team that started sharp had to wonder how the heck it happened.
Worse, Michigan State got the football again on the opening kickoff of the third quarter, and didn't waste time widening the gap.
Cook found tight end Josiah Price just outside the Illini end zone and ducked in for a 13-yard touchdown with 10:07 left in the third quarter.
Up 21-3, the Spartans were coasting.
The Illini had to think hard about the ways things might have been different.
The two shots from the Michigan State 1 when the deficit was just 7-3 hurt.
Just as bad, the Illini settled for the field goal on the game's opening drive when a 13-yard Jon Davis touchdown catch from quarterback Nathan Scheelhaase was called back because of a holding penalty on center Alex Hill. Davis appeared furious when he heard the referee's call, punching the air in front of him in disgust.
And Illinois handed the Spartans their first points. Wide receiver Ryan Lankford was hit hard by Spartans defensive end Shilique Calhoun as he tried to pitch to Martize Barr on a double reverse. The other Spartans defensive end, Marcus Bush, recovered the ball at the Illinois 23.
Four plays later, Langford punched the ball in from the Illinois 1-yard line for the first of his touchdowns and a 7-3 lead.
Early in the fourth quarter, Andrew Maxwell and Tyler O'Connor relieved Cook early in the fourth quarter. Cook roamed the sideline the final 15 minutes with his helmet off, exchanging smiles and backslaps with Langford, Fowler and the other Spartans starters who'd been pulled.
Illinois' Big Ten losing streak reached 17 games, with a road trip to Penn State on the schedule next Saturday. The last Illini win the in the conference came more than two years ago, 41-20 over Indiana on Oct. 8, 2011.