Brian Winter made the go-ahead shot with 2:07 to play in Milwaukee and seconds later Charlie Criss stole the ball and scored to help beat Boston.
Marques Johnson scored 29 points, Winters 23 and Harvey Catchings a season-high 12 as the Bucks closed to two games of Boston in the won-lost standings in the race for a home-court advantage in the Eastern Conference playoffs.
The Celtics, having lost five of their last seven, were led by Larry Bird's 22 points and Robert Parish's 18.
Milwaukee led, 102-94, with 5 1/2 minutes left, but Scott Wedman sank two jump shots and M.L. Carr one for the Celtics.
After Winters scored, Bird tipped in a rebound and Carr drove for a layup after a steal as the Celtics tied at 104 with 2:38 to play.
After Winters countered with his go-ahead basket, Criss slapped the ball away from Carr into the hands of Johnson, who passed to Criss for a layup and a 108-104 lead. Wedman sank a free throw, but missed a three-point shot seconds later. Johnson scored on a breakaway layup and Criss on a long jump shot to build the lead to 112-105.