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.
Texas principal bans speaking Spanish, stirs controversy
Britney Spears on kissing Ryan Gosling, Justin Timberlake in the Mickey Mouse Club