Rees, who was benched for most of the game after being suspended for Notre Dame's opener last week, took over with 2:12 remaining in a 17-17 tie game and completed 3-of-8 passes to get the Fighting Irish (2-0) within field goal range.
The key play on the drive was a 21-yard strike to Robby Toma, and Kyle Brindza followed with a 27-yard field goal with 7 seconds left for the winning margin.
Notre Dame's Everett Golson started behind center and threw for 289 yards and a touchdown, but his late fumble set up a 15-yard, score-tying touchdown pass from Purdue's Caleb TerBush to Antavian Edison.
TerBush finished with 70 aerial yards with a touchdown and two interceptions on 8-of-19 passing for the Boilermakers (1-1), who dropped their fifth straight to Notre Dame.
Rosie O'Donnell unveils nearly 50-pound weight loss
Members of Congress to keep receiving porn magazine