Felix stood alone as players from both teams watched Isaiah Taylor's 3-point attempt in the final seconds bounce off the rim. The ball dropped straight to Felix, who calmly put it in. After a few minutes of reviewing replay video, the game officials ruled the basket good.
Felix finished with 25 points for Texas (6-3) and made five 3-pointers. Marcus Paige scored 20 to lead the Tar Heels (7-2), who started the season No. 1.
The Tar Heels had tied it on a short jumper by Brice Johnson with 8 seconds left. Texas got the ball to Taylor, who launched his shot from the left wing before it bounced to Felix.
For Smart, the game was a chance to unveil the potential of a Texas program that enjoyed many winning seasons under Rick Barnes but has mostly struggled in the postseason for most of the last decade.
Texas fired Barnes after another NCAA tournament early-round exit last year to bring in Smart, whose swashbuckling "havoc" style of up-tempo, pressure basketball had built his reputation at Virginia Commonwealth.
But Smart's start at Texas has been slow. Long road trips to China and the Bahamas before Thanksgiving led to three losses in the first five games and left Smart questioning his players' confidence.
They showed no fear of the highly ranked Tar Heels from the start, fighting back from early deficits behind Felix and the big plays of freshmen Eric Davis and Kerwin Roach. The Longhorns also had a huge 20-4 advantage in offensive rebounding, leading to 21 second-chance points.
The game came down to a basket-for-basket blur in the final minute. Taylor scored 18 points and Davis scored 16, including a crowd-energizer, buzzer-beating bank shot to close the first half.
Cam Ridley scored 12 for Texas. His layup and free throw put the Longhorns ahead 79-76 with 2 minutes left.
The Tar Heels tied it twice in the final minute.
Justin Jackson scored 15 for North Carolina. Johnson and Isaiah Hicks each scored 14 for the Tar Heels.
North Carolina: Paige made three 3-pointers to set the school record. His last, with 6 minutes to play, passed Shammond Williams, who had 293.
North Carolina hosts Tulane on Wednesday.