Seth Curry added a season-high 22 points for the Blue Devils (22-2, 9-1 Atlantic Coast Conference).
They trailed 43-27 in the final minute of the first half and were down 14 at halftime before clamping down on the Tar Heels, outscoring them 50-30 in the final 20 minutes to keep hold of first place in the league.
Tyler Zeller had 24 points and a career-high 13 rebounds, and John Henson added 14 points for North Carolina (17-6, 7-2), which had its five-game winning streak snapped and lost for the third straight time in college basketball's fiercest rivalry.
Kyle Singler finished with 10 points on 3-of-17 shooting for Duke, but hit three important free throws in the final minute — including two with 25.2 seconds left to make it 75-70 after North Carolina had made it a one-possession game.
Then, after Kendall Marshall hit a free throw to pull the Tar Heels within four with 17.2 seconds left, Smith beat everybody downcourt and soared for a breakaway dunk that all but ensured the Blue Devils would avoid their first loss at Cameron Indoor Stadium in almost exactly two years. Duke extended its NCAA-best winning streak at home to 33.
The Blue Devils were in the unfamiliar position of being dominated on their home court when their guards got things rolling in the final seconds of the first half, with Curry's jumper at the 5-second mark starting the 18-6 run that made it a game again.
Smith's jumper from the elbow pulled Duke to 49-45 with 14½ minutes left, about 4 minutes before Curry started the 13-1 run that put the Blue Devils up for the first time.
Curry reeled off seven quick points in little over a minute before Ryan Kelly delivered the game's only lead change. His 3-pointer put Duke up 57-55 with 9:15 left, and Smith's three-point play roughly a minute later stretched it to 60-55.
Smith finished 13 of 23 and surpassed his previous career high of 33 points set a month ago against UAB. Curry hit two free throws in the final seconds to surpass his 20-point performance Jan. 27 against Boston College. They helped the Blue Devils deliver a comeback for the ages: Duke hadn't erased a halftime deficit that big to win since 1959, when Navy led the Blue Devils by 14 at the break.
Nobody on North Carolina's reconstituted roster had ever played in a victory at Cameron — a 180-degree reversal from Feb. 11, 2009, when Tyler Hansbrough and Danny Green won for the fourth time in four trips to Duke while handing the Blue Devils their most recent loss at home.
The only current scholarship Tar Heel who was on the team that year — Zeller — didn't play in that game because he was injured.
But for essentially the entire first 20 minutes of this one, it was North Carolina that was in complete command.
The Tar Heels never trailed during the first half, reeled off the first eight points and methodically stretched their lead to 16 on Zeller's stickback with 1:10 before the break. They did it largely by outworking the Blue Devils — beating them downcourt with regularity, with the big men dominating the paint. By halftime, Zeller had 13 points and nine rebounds while Henson added 10 points.