The defeat leaves the Rossoneri in second place on 71 points, seven behind league winners Inter who have three games to go.
Jose Mourinho's men will host Siena on Sunday, where they will be officially named this season's champions.
Gaetano D'Agostino and Cristian Zapata scored Udinese's goals, while Massimo Ambrosini hit a late consolation for Carlo Ancelotti's team.
Milan were second best right from the start at the Stadio Friuli, and Udinese were kept at bay thanks to a couple of crucial saves from Nelson Dida.
The Brazilian keeper was helpless when Paolo Maldini fouled Antonio Floro Flores in the box on 20 minutes. Gaetano D'Agostino stepped to confidently convert from the spot.
The visitors struggled to even threat for an equalizer as the first half ended with Udinese's one-goal advantage.
The game's tempo was raised after the restart as Ambrosini had waves for a penalty-kick waved away by the referee right before Zapata was allowed to score Udinese's second.
In an attempt to go all out attack, Milan brought on Ronaldinho for Clarence Seedorf, but it was D'Agostino who nearly scored again for the hosts if it wasn’t for Dida's save.
The visitors started to grow desperate before they scored their only goal of the game thanks to a typical Ambrosini header in injury time.
The win lifts Udinese to seventh in the table with 54 points.
Milan might end up losing their second spot, as they are just four points ahead of third-placed Juventus, who will host Atalanta on Sunday.