The Rockets trailed by one entering the fourth quarter, but they used 14-4 run, highlighted by consecutive 3-pointers by Ariza, Jason Terry and Josh Smith, to take a 98-89 lead with about nine minutes left.
Chandler Parsons made a layup for the Mavericks before Houston scored five straight points to push the lead to 103-91. Terry started that stretch with a 3-pointer and Smith juked Dirk Nowitzki to get open for a hook shot, and the Mavericks didn’t threaten again.
Parsons had a season-high 31 points for the Mavericks, who dropped their second straight game.
Smith, who was acquired in a trade with the Clippers on Friday, scored a season-high 16 in his second game back with the Rockets.
Houston led by 13 midway through the fourth quarter when the Rockets scored four points in a row, including a two-handed dunk by Ariza, to make it 112-95 with about four minutes remaining.
Harden collected his second triple-double of the season and eighth of his career when he dished to Clint Capela for an alley-oop dunk with 1:26 remaining, putting the Rockets up 115-102.
Houston played without Dwight Howard, who missed his second straight game with a sprained left ankle.
Dallas led by 11 after a 3-pointer by Nowitzki before Houston used a 13-6 run, with the first seven points from Harden, to cut the lead to 76-72 with 4 1/2 minutes left in the third quarter.
Raymond Felton made a 3-pointer with about 34 seconds left in the quarter to put Dallas up 85-84 entering the fourth.
Ariza made his first six shots, including four 3-pointers, to finish the first quarter with 16 points. He cooled off in the second quarter and the Mavericks outscored Houston 29-14 to take a 58-50 halftime lead.
Mavericks: C Zaza Pachulia missed the game with a right leg injury. … Nowitzki scored 19 points. … Matthews finished with 15 points.
Rockets: Ariza made a season-high six 3-pointers. … F/C Donatas Motiejunas missed his 12th straight game with back soreness. … G Patrick Beverley returned after missing two games with a sprained left ankle. … Corey Brewer had 13 points and four steals. … Ty Lawson finished with 10 points.