The 48 points marked a season low for the Tar Heels (15-1, 3-0), while their 22 first-half points were one more than their season low for points in a half (21 vs. North Carolina Central on Dec. 12).
North Carolina was 7-of-25 shooting (28 percent) in the first half and made just 2 of 13 3-point attempts for the game.
The 3-0 ACC start is the Tar Heels best since 2009.
The teams were tied 22-all at halftime. North Carolina took its final lead, 28-26, on McDaniel's jumper with 17:06 left. The basket sparked an 8-2 run, and the Hokies never pulled closer than two points after that.
Uju Ugoka led Virginia Tech (7-7, 1-2) with 15 points.