Chase Audige added 15 points and Ty Berry had 13 for Northwestern (6-2), which ended a two-game losing streak.
''Needless to say, this was a huge win for us,'' coach Chris Collins said. ''Coming off our performance in the ACC-Big Ten challenge, where we lost badly on our home floor (to Pittsburgh), I was really pleased with our resolve the past couple days.''
Mady Sossoko and A.J. Hoggard each had 12 points for Michigan State (5-4) and Joey Hauser added 10. The Spartans have lost two in a row, falling to Notre Dame earlier in the week.
Hoggard cut Northwestern's lead to 64-63 with 46 seconds left. After a timeout, Buie scored on a layup with 23 seconds left.
''We got out-toughed,'' Michigan State coach Tom Izzo said.
Northwestern took the lead late in the first half on a layup by Buie and never relinquished it, leading by as many as nine points.
''We put (the loss to Pittsburgh) under the rug,'' Buie said. ''We turned the page, just like we do with any win or loss. The season is so long you can't get caught up on one single game. Just like tonight. We're super happy with the win, but after tonight it's over. You can't dwell on things.''
The Wildcats went 21 of 24 on free throws, while the Spartans were 9 of 12.
''I was concerned about a knockout punch early,'' Collins said. 'I knew they would be revved up after the Notre Dame loss. They hit us early and got a seven-point lead, and then we settled down.''
Northwestern: Hosts Prairie View A&M on Dec. 11
Michigan State: At Penn State on Wednesday night.
AP college basketball: https://apnews.com/hub/college-basketball and https://apnews.com/hub/ap-top-25-college-basketball-poll and https://twitter.com/AP-Top25
Copyright 2023 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.