Tim Hardaway had 19 points and 11 assists and Eddie Jones scored 23 to lead visiting Miami.
Anthony Mason added 20 points, 18 after halftime, and 10 rebounds, and Brian Grant had 16 points and 14 rebounds for Miami. The Heat blew a 13-point second-half lead, but rallied to win its fifth in a row.
Jerry Stackhouse led Detroit, which lost its second in a row, with 35. Chucky Atkins scored 16 of his 26 in the fourth quarter, and Ben Wallace had eight points and 21 rebounds.
Miami led 49-40 at the half thanks to Hardaway's three-point play in the final seconds of the second quarter.
The Heat led by as many as 13 in the third, but Stackhouse scored 13 points to get the Pistons to 74-67 at quarter's end.
Atkins' three-pointer cut Miami's lead to 89-85 with 4:50 left. After Mason made a free throw, Atkins hit another three-pointer to get Detroit within two.
Atkins wasn't finished, as his fourth three-pointer of the quarter tied it at 92 with 1:10 left.
After Jones missed, Stackhouse took an outlet pass from Atkins and turned it into a fast-break three-point play.
Jones, though, answered with a three-point play of his own to tie it with 34.7 seconds left.
Smith's go-ahead attempt was blocked by Grant, but Hardaway was stripped of the ball, giving Atkins a chance to win it with a 30-footer. The shot bounced off the rim, sending the game to overtime.