Purdue led 21-19 in the fourth quarter, but the Boilermakers committed their sixth turnover on a sack of Elliott with 6:28 to play.
Northwestern (3-2, 1-1 Big Ten) grabbed its only lead when Mike Kafka took a shotgun snap and ran for a 2-yard TD with 2:09 left. Kafka's two-point conversion pass to Drake Dunsmore gave the Wildcats a 27-21 lead.
Purdue (1-4, 0-1) drove from its 16-yard line but couldn't score despite getting a first-and-goal.
Purdue led 21-3 but committed five turnovers in a span of about 17 minutes to help the Wildcats get back into the game.
Elliott passed for 313 yards and three touchdowns. Kafka passed for 224 yards and ran for 39.
On the Wildcats' first play from scrimmage, Arby Fields was stripped by Ryan Kerrigan, and Purdue's Torri Williams recovered at the Northwestern 34. Elliott took advantage by completing a 5-yard touchdown pass to Keith Smith with just 2:32 gone.
Northwestern got only a field goal out of a 20-play drive, and Purdue quickly made the most of its goal-line stand. Elliott's second touchdown pass came on a 67-yard screen to Valentin. After Valentin caught the pass, he stiff-armed a defender on the sideline and jogged into the end zone to give Purdue a 14-3 lead.
Elliott connected with Valentin again early in the second quarter. This time Valentin made a 5-yard catch in the back of the end zone to give the Boilermakers a 21-3 lead.
Northwestern followed with another 20-play drive that took 9:32, and this time, the Wildcats got nothing. Jacob Schmidt was stopped on a fourth-and-goal from the 1.
Elliott made his first mistake by throwing an interception to Sherrick McManis, and Northwestern quickly turned it into points. Fields scored on a 5-yard run to make it 21-10.
Valentin fumbled the kickoff, and Northwestern recovered at the Purdue 23. Stefan Demos then kicked a field goal to cut the gap to 21-13.
Jaycen Taylor fumbled with 39 seconds left in the first half, and Northwestern recovered at the Purdue 24. Demos kicked another field goal to trim Purdue's lead to 21-16 at halftime.
Northwestern ran 88 plays to Purdue's 57.
Iowa State president Wendy Wintersteen said Tuesday the university will appeal a $25,000 fine levied by the Big 12 for violating postgame celebration policies when fans stormed the field following a home win over West Virginia last weekend.
Minnesota running back Shannon Brooks has returned to the team following his weekend arrest on suspicion of misdemeanor domestic assault.
Adam Rittenberg reports the latest on Maryland's investigation of head football coach DJ Durkin.
David Pollack previews NC State's visit to Clemson Saturday at 3:30pm ET on ESPN.
David Pollack and Mel Kiper Jr. react to Nick Bosa's decision to withdraw from the Buckeyes to focus on the NFL draft.
Head coach Barry Odom talks about what the Tigers learned from last week's loss and what he's expecting in Week 8.