Terry came off the bench to pace the Mavs, who got 26 points from Dirk Nowitzki in their third consecutive victory and 15th win in 16 games.
The victory was Dallas' 14th in a row against Miami.
LeBron James struck for 19 points, 10 rebounds and seven assists to lead the Heat.
Dwyane Wade contributed 22 points and seven assists, but Miami faltered on defense down the stretch to absorb its first loss since Nov. 27.
NBC reportedly holds celebs hostage to Jimmy Fallon's show
Millions of Getty images now available for free via embed tool