In snapping the Badgers' six-game winning streak and handing them their first home loss of 2013, the Lions finished their second season under O'Brien at 7-5, with a 4-4 mark in the Big Ten.
Penn State had four plays of more than 50 yards, two of them - passes from Hackenberg of 68 yards to Adam Breneman and 59 yards to Geno Lewis - going for touchdowns. The Nittany Lions also got a late, 61-yard run from Zach Zwinak that helped them milk all but 31 seconds off the clock at the end.
O'Brien, who told reporters Tuesday that he wasn't aware of the Las Vegas line, sure made his players aware of it and did so repeatedly.
"Flat out, I addressed it head-on," he said. "I thought it was ridiculous. I thought that Wisconsin was a very, very good football team. I thought that they had a great year. I thought that we were close in some games, and we had shown resiliency, and we had some good players. I thought that we matched up pretty well."
O'Brien also said he felt no one in State College thought they could win, and chided media members for agreeing with the line and told them that "it didn't matter what you guys think" about his team.
Guard John Urschel certainly thought the Lions could win.
"Wisconsin's obviously a very good football team, and we're so happy to have the win," Urschel said. "But 24-point underdogs? Come on."
But Penn State showed right away it could match up, scoring on the 68-yard Hackenberg-to-Breneman strike on the fourth play of the game. From a 14-14 halftime tie, the Nittany Lions scored 17 straight points, including TD passes from Hackenberg to Jesse James and to Lewis, to go up by 31-14 with 12 minutes, 59 seconds remaining.
Wisconsin (9-3, 6-2), which fell out of BCS bowl consideration with the loss, scored the next 10 points to close the gap to seven with 4:13 to play. But the Badgers didn't get the ball back until after Sam Ficken missed a 31-yard field-goal attempt that could have iced the game for the Lions.
With 31 seconds left and no timeouts, Wisconsin moved to the Penn State 41, but quarterback Joel Stave's Hail Mary pass to the end zone was picked off by safety Ryan Keiser.
Hackenberg had arguably the best game of his eye-opening freshman season, completing 21 of 30 passes for 339 yards.
"I felt the guys did a great job executing," Hackenberg said. "The offensive line did a great job executing, and the receivers ran great routes, and I got the ball to them today, and they did the rest."
It wasn't a perfect performance. Penn State was flagged an unfathomable eight times for false starts, with tackle Donovan Smith responsible for four calls. Things looked a little shaky in the secondary after starters Adrian Amos (foot) and Malcolm Willis (shoulder) went out.
But reserve cornerback Trevor Williams had an interception, and freshman linebacker Brandon Bell, the former Oakcrest High star making his first career start, stripped the ball from Stave on a sack that teammate C.J. Olaniyan recovered.
For a team that hadn't won a Big Ten game on the road until Saturday, this was huge.
"I think we were close to playing well on the road if we could eliminate those mistakes," O'Brien said.
"We didn't eliminate all those mistakes tonight, but we eliminated enough, and our defense hung in there and played a whale of a game, and our offensive guys made enough plays to win the game."