Jackson completed 30 of 46 passes for 378 yards and two touchdowns and rushed 21 times for 107 yards, accounting for 485 of Louisville's 524 yards of total offense.
Jackson's 20-yard touchdown pass to Dez Fitzpatrick with 9:01 remaining gave the Cardinals a 32-28 lead, and Blanton Creque's 30-yard field goal with 4:18 remaining extended the advantage to 35-28.
"A shout out to Purdue," Jackson said. "They came to play and played a hell of a game. We underestimated them, I feel. On offense, we didn't do what we were supposed to. We got in the red zone numerous times and didn't execute, so we've got to hit the film and the practice harder."
Louisville defensive back Chucky Williams iced it with an interception of a pass by Purdue's Elijah Sindelar with 2:22 remaining.
"It's a hard-fought game," Louisville coach Bobby Petrino said. "Certainly, I felt like we gave them opportunities. We kept them in the game some when we didn't score early. I am really disappointed in our penalties (16 for 110 yards) and turning the ball over (three lost fumbles).
"I thought Lamar competed extremely hard ... you just can't turn the ball over on the 1-yard line. I thought he did what he needed to do to let us win."
The game was the first for Purdue coach Jeff Brohm, a former Louisville quarterback and assistant coach.
"I thought we showed fight, but unfortunately we came up short," Brohm said.
The Boilermakers got two touchdown passes each from Sindelar and David Blough, but a 61-yard interception return of a Blough pass by Stacy Thomas for a touchdown in the third quarter gave Louisville a 25-21 lead.
Blough completed 18 of 26 passes for 175 yards, two touchdowns and two interceptions. Sindelar completed 15 of 31 for 118 yards, two touchdowns and an interception.
"The plan is to keep playing them and let it play out, and I think both guys will compete and get better," Brohm said.
Freshman Jackson Anthrop caught two touchdown passes for Purdue in his first game. He finished with seven catches for 82 yards.
Louisville twice lost fumbles inside the Purdue 1-yard line during the first 30 minutes in a strange first half that ended with the Boilermakers leading 14-10.
"I'm really proud of our defense," Petrino said. "I thought they did a good job of making stops when they had to, a great interception for a touchdown that set up some good field position that we weren't able to take advantage of like we normally would."
Sindelar, who made his first career start, gave the Boilermakers a 7-0 first-quarter lead with a 26-yard touchdown pass to Anthrop with 7:27 on the clock, capping a three-play, 36-yard drive after a short Louisville punt.
The Cardinals countered quickly, pulling even at 7 with 3:39 remaining in the first quarter on Jackson's 3-yard touchdown pass to Josh Davis. Louisville covered 64 yards in eight plays to tie the score.
Creque's 23-yard field goal with 14:19 to play in the second quarter pushed the Cardinals into a 10-7 lead. They drove 72 yards in 10 plays for that score.
But Blough, Purdue's projected starting quarterback until he sustained a strained right shoulder in an Aug. 12 scrimmage, gave the Boilermakers a 14-10 halftime lead with an 8-yard touchdown pass to Richie Worship with 51 seconds left before intermission. Purdue drove 78 yards in 11 plays to seize the lead.