The Nittany Lions (9-18, 1-14) had lost 18 straight regular-season conference games dating to last season, but they roared back from a 15-point deficit with 10:39 left behind the energetic play of Marshall. The junior guard scored 19 in the second half, including four 3s that whipped Jordan Center fans into a frenzy.
D.J. Newbill added 17 points for Penn State, which hit a season-high 10 3-pointers. Marshall's twisting drive to the basket gave the Nittany Lions a three-point lead before Michigan's Glenn Robinson III misfired on a 3 with 17 seconds left.
Sasa Borovnjak had a memorable Senior Night, hitting two foul shots with 15 seconds left to seal the win. Moments later, Penn State fans rushed the court in delight.
Tim Hardaway Jr. scored 19 points for the Wolverines (23-5, 10-5).
It was Penn State's first win over a top 5 team since defeating No. 5 North Carolina 82-74 in the second round of the 2001 NCAA tournament.
Penn State also got its first conference win since beating Iowa 69-64 on Feb. 16, 2012.
The loss is likely to hurt Michigan as it jockeys for seeding in the NCAA tournament. The Wolverines squandered a chance to pull into a second-place tie in the Big Ten with Michigan State and Wisconsin.
Trey Burke had 18 points and six assists for Michigan, but also committed six turnovers. The Wolverines had 15 turnovers in the game, six more than their season average.
Still, two 3s by Hardaway during a 15-4 run midway through the second half gave his team a 66-51 lead. But it was Penn State that made clutch plays down the stretch.
Marshall led the way, while Ross Travis provided the muscle up front with 15 points and 12 rebounds.
Penn State coach Patrick Chambers has been saying all conference season long that his rebuilding team was "so close" to getting a league win.
The Nittany Lions finally got one against one of the toughest foes they'll face all year.
Two foul shots by Marshall gave Penn State its first lead since the first half, 76-74, with 3:55 left. The Jordan Center rocked as if it were a Michigan-Penn State football game across the street at Beaver Stadium.
Burke hit two foul shots with 1:21 left to get Michigan within one before Marshall's layup that teetered on the rim before dropping in.
It was all Penn State from there.