Miami won its eighth straight and maintained a four-game lead in the Southeast Division over Orlando, which also has won eight in a row.
The Bucks lost their third consecutive contest but they rallied from a 16-point deficit in the second period and gave themselves a chance when Earl Boykins made a layup with 2 seconds left in regulation to force the extra period.
Miami never trailed in overtime and Arroyo gave the Heat their first four-point lead of the session by making a layup with 1:16 to play. He hit two free throws with 10 seconds remaining to put Miami in front 99-95.
LeBron James led Miami with 26 points and the Heat overcame 39 percent shooting from the field by making 26-of-32 from the foul line.
Chris Douglas-Roberts scored 30 off the bench to pace the Bucks.
Moore to attend retreat in to avoid Kutcher's wedding
Turkey considering to use pistachios to heat country’s first eco-city