The Heat played without NBA MVP LeBron James, who was out with "general soreness," according to coach Erik Spoelstra.
Josh Harrelson's 3-pointer with 1:01 remaining put the Heat ahead for good at 102-99. Harrelson finished with 10 points.
Dwyane Wade scored 13 for Miami and sat out most of the second half.
Gary Neal made a 3-pointer with 3:00 remaining in the third to give San Antonio an 84-74 lead.
Spurs star Tim Duncan finished with 15 points and six rebounds while playing only in the first and third quarters.
Mike Miller hit all three of his 3-point attempts in the second quarter to help Miami build its biggest lead of the first half at 57-46.