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.
NBC reportedly holds celebs hostage to Jimmy Fallon's show
Millions of Getty images now available for free via embed tool