The Wolverines were leading by a single point with less than a minute remaining when Stauskas drilled a trey for a 71-67 advantage.
He then went on to make 6-of-6 free throws to hand Michigan (13-4, 5-0 Big Ten) its first win in Madison since 1999.
Caris LeVert accounted for 20 points, seven rebounds, four assists and four steals. Glenn Robinson III added 14 points as the Wolverines snapped an 11-game road losing streak against the Badgers.
Wisconsin (16-2, 3-2) got 16 points from Josh Gasser as it continued to stumble following a school-record 16-game winning streak starting the season.
Ben Brust and Frank Kaminsky each scored 14 points.