Barnes' turnaround jumper with 6:10 remaining broke a 94-all tie and sparked a 16-10 run to put the Mavericks ahead 110-104 with 1:18 left. He finished with a team-high 25 points and 11 rebounds.
Charlotte (15-24) fought back to pull within 111-110 on Kemba Walker's three-point play with 31.7 seconds to go, but Smith hit a pair of free throws with 15.7 ticks left to restore a three-point lead, and the Mavs held on from there.
Walker finished with a game-high 41 points on 16-of-28 shooting.
Smith, a native of Fayetteville, N.C., who played college hoops at N.C. State, sank 5 of 6 free throws in the final 2:32 and finished with 15 points and six assists in his first regular-season NBA game in his home state.
"Not exactly Fayetteville, but (being) in North Carolina it's a great feeling," Smith, the ninth overall pick in last year's draft, told reporters before the game.
Yogi Ferrell had 22 points and Dirk Nowitzki added 19 as Dallas (15-28) won its second straight game following a three-game skid.
Dwight Howard totaled 15 points and 12 rebounds, Jeremy Lamb scored 12 and Michael Kidd-Gilchrist had 11 for Charlotte, which had won two in a row.
Charlotte's Cody Zeller missed his 16th consecutive game with a meniscus tear in his left knee.
Dallas led 83-77 entering the fourth quarter. Lamb's 3-pointer tied the game at 88 with 9:10 remaining to cap an 11-5 quarter-opening run for Charlotte.
The Mavericks broke the game open with a 39-point second period, its fifth such quarter of the season, to give Dallas a 59-52 halftime lead. Charlotte was ahead 28-20 after one.
Charlotte plays the second leg of its three-game homestand Friday against Utah. Dallas returns home to face the Los Angeles Lakers on Saturday.
--Field Level Media
Dallas | Charlotte | |
Harrison Barnes 25 | Scoring | Kemba Walker 41 |
Dennis Smith Jr. 6 | Assists | Kemba Walker 4 |
Harrison Barnes 11 | Rebounds | Dwight Howard 12 |
Dennis Smith Jr. 7 | Free Throws Made | Kemba Walker 6 |
Maxi Kleber 2 | Steals | Kemba Walker 3 |
Salah Mejri 2 | Blocks | Dwight Howard 4 |
Team | Points | FG% | 3PM-3PA | FTM-FTA | Assists | Rebounds | Blocks | Steals | Turnovers |
Dallas | 115 | 47.0 | 15-36 | 22-28 | 23 | 39 | 7 | 7 | 8 |
Charlotte | 111 | 51.2 | 10-26 | 15-30 | 16 | 43 | 5 | 6 | 11 |