Thomas' scoring throws all came in the first half as the Hokies (5-1, 2-0 Atlantic Coast Conference) still struggled to get their running game going, but won their fifth straight.
The loss was the third straight for the Tar Heels (1-4, 0-2), who started dual threat Marquise Williams at quarterback in place of Bryn Renner, who injured his left foot last week. Williams played well, and was driving the Tar Heels with a chance to pull them within one possession in the fourth quarter, but on fourth-and-1 from the Virginia Tech 33, he threw deep for tight end Jack Tabb and Kyle Fuller intercepted.
The Tar Heels later also fumbled a punt, leading to the Hokies' final touchdown and rendering Williams' 24-yard scoring pass to Quinshad Davis with 1:09 remaining inconsequential.
Williams, a 6-foot-2, 215-pound sophomore, finished 23 of 35 for 277 yards with two touchdowns and two interceptions. He also led the Tar Heels in rushing with 56 yards on 18 attempts.
The first half was all Thomas and receivers Willie Byrn, Demitri Knowles and D.J. Coles. Thomas completed 13 of 20 passes in the half for 230 yards, accounting for most of the Hokies' 277 yards.
Thomas finished 19 for 28 for 293 yards.
Thomas hit Byrn for 17 yards one play before Knowles got free behind the Tar Heels' secondary for a 45-yard touchdown catch to open the scoring. After another punt by North Carolina, the Hokies drove 73 yards in 12 plays capped by Thomas' first of two TD passes to Coles, a 9-yard bullet on third down.
Byrn caught an 18-yard pass on that drive, converting a third-and-10 from the Tar Heels' 27.
North Carolina had gained just 26 yards on 12 plays, but quickly changed that. Williams hit Davis with a short pass that Davis took 40 yards to the Hokies' 35. A 16-yard completion to T.J. Thorpe followed, and Williams later capped the drive with a 6-yard pass to Eric Ebron for the touchdown.
Late in the half, the Tar Heels seemingly had momentum on their side and pinned the Hokies at their 2 yard-line with a punt, but Thomas found Byrn behind the secondary and hit him for an 83-yard play, the third-longest in school history that didn't end in a touchdown. Two plays later, Thomas hit fullback Sam Rogers for 14 yards, and after a false start penalty, he found Coles for a 5-yard touchdown.
The Hokies managed just 64 yards in the second half, but the defense had it covered.