It was only the second win in a month for the Magic and their 20th of the season.
After defeating Philadelphia March 10, Orlando lost eight in a row. The Magic then defeated Washington before dropping five consecutive games.
Milwaukee overcame a 14-point deficit after one period and was in position to win the game before Harris hit his 3-pointer with 1.9 seconds left in regulation.
Harris was fouled on the shot, but he missed the free throw that would have won it.
Orlando, however, jumped to a seven-point lead with 1:20 to go in the overtime.
Both Harris and Nikola Vucevic had 30 points for the Magic with Vucevic grabbing 20 rebounds and Harris claiming 19. Doron Lamb came off the bench to contribute 16.
Monta Ellis scored 21 for the Bucks, who are headed for an eight-place finish in the Eastern Conference and a first-round playoff meeting with Miami.