With the Heat leading 71-69 entering the final period, the Bucks (16-12) kicked into high gear and outscored Miami 35-14 to blow them off the floor in the last quarter.
Brandon Jennings scored 25 points, Mike Dunleavy scored 13 of his 18 in the fourth and Milwaukee forced Miami into errors and turnovers. It was Miami's second successive loss.
Heat guard Dwyane Wade returned from his one-game suspension for kicking Charlotte's Ramon Sessions and scored 24 points, while LeBron James added 26 points.
Milwaukee had jumped out to a 56-44 halftime lead but gave the advantage back in the third where James took over and the Heat outscored them 27-13 in the quarter.
Everything changed in the fourth, however, as Larry Sanders and Luc Richard Mbah a Moute both produced two blocks each in the first few minutes to fuel a stirring run for the home side. (Writing by Jahmal Corner in Los Angeles; Editing by Greg Stutchbury)