It was the Tar Heels' first victory against the Blue Devils in the tournament since 1998. Luke May rebounded from a dreadful effort against Miami to lead the Heels with 17 points.
Maye scored North Carolina's last field goal with 5:33 remaining, and No. 12 North Carolina held off a late rally by No. 5 Duke, besting the Blue Devils for the second time in three meetings this season.
UNC (25-9) will play No. 1 Virginia for the ACC championship on Saturday night at Barclays Center in Brooklyn in a rematch of the 2016 ACC championship, won by North Carolina.
The Cavaliers beat Clemson in the first semifinal.
North Carolina led by 15 when Maye hit a jumper with 5:33 left and it looked as if it would cruise into the title game. But the Tar Heels went cold and second-seeded Duke went on a 13-0 run, drawing within three on Gray Trent Jr.'s 3 with 50 seconds left.
The Tar Heels turned the ball over on consecutive possessions, but an offensive foul by Grayson Allen and then a missed 3 by Allen, trying to draw contact on Maye, stymied Duke (26-7).
Theo Pinson made two free throws with 3.2 seconds left to seal it and the Tar Heels snapped a six-game losing streak in the ACC Tournament to their heated Tobacco Road rivals.
Pinson had seven of North Carolina's 24 assists on 28 field goals as the Tar Heels cut up Duke's zone most of the night. Joel Berry II had 13 points and six assists and Kenny Williams had 10 and six. Maye rebounded from a 1-for-15 shooting performance in the quarterfinals against Miami to shoot 8 of 18 with 10 rebounds and four assists.
Marvin Bagley III followed up his 33-point, 17-rebound game against Notre Dame on Thursday with 19 points and 13 rebounds for Duke. Fellow freshmen Trent added 20 points and Wendell Carter Jr. had 14 points and nine rebounds.
Allen received a Flagrant 1 foul for hip-checking North Carolina's Garrison Brooks as the Tar Heels forward was running up court late in the first half.
Brooks went down hard and stayed down in the backcourt as North Carolina scored. Officials stopped play and went to the courtside monitor to check a replay. Allen clearly stuck his backside out enough to bump the unsuspecting Brooks while 6-foot-9 freshman was in the middle of a stride. Brooks was OK and made two free throws with 52.7 second left.
Asked about the buttcheck Grayson says “they had a fast break and I got a foul.”— Mark Armstrong (@ArmstrongABC11) March 10, 2018
Allen, a senior, was reprimanded by the ACC for tripping two opponents in his sophomore season. He was stripped of his captaincy by Duke for another trip as a junior.
North Carolina: A night after Duke earned its 100th ACC Tournament victory, the Tar Heels did the same and put themselves in position to earn a 19th conference championship. That would leave them one behind Duke for the most.
Duke: The Blue Devils had six turnovers on their first 14 possessions and just one field goal in the first 10 minutes of the game. North Carolina led by as much as 13 points, before Bagley got going and scored eight points in the last 10 minutes.
North Carolina: The Tar Heels scored 49 points in a home loss to Virginia on Jan. 6
Duke: The Blue Devils will find out Sunday if they did enough to earn a top seed in the NCAA Tournament.