Defender Dorin Goian scored the only goal of a frantic game in the 10th minute to leave Milan five points ahead of rivals Inter Milan and six above Napoli.
Lazio moved up to fourth on 54 with a 1-0 win over Cesena in Saturday's early kick-off.
Palermo, who had lost their last five games, moved up to seventh, while the Rossoneri's fourth defeat of the campaign is likely to mean the result of the Milan derby on April 3 will go a long way to deciding who wins this season's scudetto.
Without suspended striker Zlatan Ibrahimovic, Milan coach Massimiliano Allegri paired Brazilian Pato with Antonio Cassano up front, but the visitors were immediately found wanting in defence as the Sicilian side took an early lead.
Goian, in for the suspended Cesare Bovo, was left all alone at a corner to score his first goal for the club and the first under the charge of Serse Cosmi who took over this month.
Milan, who only managed a home draw with bottom-side Bari last week, almost hit back immediately.
Mathieu Flamini's shot from 20 metres was tipped round the post and from the resulting corner Alessandro Nesta just failed to get his studs to a ball that trickled along the goal-line.
But Palermo, who lost their last home match 7-0 to Udinese leading to the sacking of coach Delio Rossi, were playing with surprising confidence.
First Javier Pastore and then Mauricio Pinilla troubled keeper Christian Abbiati as the home side attacked on the break.
Pato curled a 25-metre free-kick just over the bar before Cassano, finding space on the left, blasted wide from inside the area as the Rossoneri tried desperately to equalise.
Palermo continued to counter-attack with speed and intelligence but had recently criticised keeper Salvatore Sirigu to thank in the 65th for pulling off a spectacular save to turn aside Flamini's first-time shot from just inside the box.
Robinho, on for compatriot Pato, tested Sirigu again with a low drive before the keeper flung himself to his left to palm away Gennaro Gattuso's diving header with 10 minutes to go as Milan piled on the pressure.
Palermo substitutes Fabrizio Miccoli and Abel Hernandez missed late chances as the home side celebrated a famous win.
Earlier, Lazio's Argentine striker Mauro Zarate made the difference in only the second minute against Cesena, turning home Stefano Mauri's left-wing cross at the Stadio Olimpico.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.