Hersey Hawkins added 27 points for Philadelphia, which moved past Miami into first place in the Atlantic Division.
Philadelphia led by as many as 19 points in the second quarter and held a 91-78 advantage at the end of three periods. But Miami went on a 15-3 run at the start of the fourth quarter, cutting Philadelphia's lead to 94-93 on a rebound basket by Grant Long with 6 minutes, 24 seconds remaining.
The 76ers then went on a 12-5 run, with Barkley scoring nine, to lead, 106-98, with 2:39 remaining.
A 3-point shot by Kevin Edwards brought the Heat to within 106-103 at the 1:31 mark, but Barkley scored on a driving layup BTC with 1:13 to go. A three-point play by Ron Anderson with 38 seconds left gave Philadelphia a 111-103 edge.
Glen Rice hit a 3-pointer with 34 seconds to play and Long added a free throw six seconds later as the Heat closed to 111-107.
Free throws by Armon Gilliam and Anderson clinched the Philadelphia victory.
Johnny Dawkins added 17 points for the 76ers, who are 12-1 in their history against Miami, including 7-0 at home. Rice had 27 points and Edwards 23 for Miami, while Rony Seikaly had 19 points and 16 rebounds.