Trevor Lacey had 14 points and Ralston Turner 10 for N.C. State (15-11, 6-7 Atlantic Coast Conference)
Chris Jones scored 20 and Wayne Blackshear added 19 for Louisville (20-5, 8-4 ACC).
Terry Rozier and Montrezl Harrell, Louisville's leading scorers, combined for just 14 points after scoring a total of 50 in Wednesday's 69-56 win against Pittsburgh.
The Cardinals fell to 78-2 in the last three years when leading at halftime. Louisville led 31-30 at the break.
N.C. State outrebounded Louisville 47-37 with Caleb Martin and Beejay Anya each grabbing 10. Harrell, a preseason All-America, had 13 rebounds but was scoreless in the first half and finished with seven points.
Rozier, the ACC's leading scorer at 18.5 points a game, finished with a season-low seven points and fouled out with 4:56 to play.
Harrell's hook shot with 14:10 remaining gave Louisville a 43-41 lead before Kyle Washington responded with the same and Lacey's 3 with 13:27 put N.C. State up for good at 46-43.
Jones' steal and layup on the other end pulled Louisville to within 57-52 with 7:06 to play before the Cardinals missed nine straight field goals and lost Rozier to fouls during a five-minute stretch late in the second half.
The Wolfpack led 63-53 at the 4:11 mark and had just 5 turnovers before committing three in 39 seconds to keep Louisville hopes alive.
Blackshear's jumper with 1:20 left cut the lead to 65-61. Barber found Beejay Anya for a dunk on the next possession and hit seven of eight free throws attempts in the last minute to seal the win.
Louisville: The Cardinals' last loss when leading at halftime came in last year's Sweet 16 to eventual national runner-up Kentucky. ... Blackshear started after playing only one minute against Pitt with a hip injury. He started strong, hitting two 3s and finishing an 11-point flurry in the first nine minutes with a dunk.
N.C. State: The Wolfpack finished the job at Louisville after their latest tough beat, a 51-47 loss to Virginia. N.C. State has lost four games this season by four or fewer points, second-most in the ACC.
Louisville: heads to Syracuse on Wednesday.
N.C. State: hosts Virginia Tech on Feb. 21.