Anthony Gill added 15 points and London Perrantes had 12 for the Cavaliers (22-6, 11-5 Atlantic Coast Conference), who moved within one game of the Tar Heels in the conference standings with two regular season games to play.
Joel Berry II led the Tar Heels (23-6, 12-4) with 21 points, including five 3-pointers. Marcus Paige added 13 points and Brice Johnson and Justin Jackson each had 12.
The Tar Heels trailed by 11 after Virginia's big run, but closed to within 77-74 with 14 seconds left on Paige's 3-pointer. But North Carolina immediately fouled Devon Hall, and he made both free throws give Virginia a little cushion.
Theo Pinson then missed a pair of free throws with 5.6 seconds left for North Carolina, but the scramble for the rebound killed most of the rest of the clock, ensuring Virginia's 34th victory in its last 35 home games.
The game was close throughout the first half and the Tar Heels pulled even at 49 on Berry's putback, but a three-point play by Marial Shayok sparked the 16-5 run for Virginia. Brogdon hit an 18-footer and his third 3-pointer of the game in the burst, and Gill, who had been quiet up until that point with just two baskets, had three straight baskets to end the burst with the Cavaliers ahead 65-54.
Gill scored 11 of his 15 points after halftime.
Virginia used an 11-5 run in the first half to- open its largest lead at 29-21, but the Tar Heels answered immediately with a 14-7 burst that feature three of Berry's four first-half 3-pointers. A layin by Isaiah Wilkins at the buzzer gave the Cavaliers a 38-35 lead at the intermission.
North Carolina: Has only allowed one opponent to shoot 50 percent or better from the floor this season. ... Berry II had a season-high four 3-points in the first half on six attempts.
North Carolina is at home against Syracuse on Monday night.