Ibrahimovic celebrates return with rapid treble
The win took title holders Milan three points clear of second-placed Juventus who only managed a 1-1 draw at home to mid-table Chievo despite taking a first-half lead through Paolo De Ceglie.
Boukary Drame levelled for Chievo in the 76th minute as Juventus, who are still unbeaten, drew for the fourth time in their last five Serie A outings.
Milan moved onto 54 points from 26 games while Juventus have a game in hand.
Robinho set up the first two of Ibrahimovic's goals while Thiago Silva completed the scoring as eighth-placed Palermo, who beat Lazio 5-1 in their last home game, were overwhelmed.
"We are playing the way we want, we are always dangerous when we attack," said Ibrahimovic, who completed his ban with last week's 1-1 draw at home to Juventus and joined Udinese's Antonio Di Natale as Serie A leading scorer on 18 goals.
"It's my second hat-trick in Italy but the goals are a bonus for me," added the Swede. "I didn't like missing the Juventus match, I've suffered and I've paid but the team has done well without me."
Ibrahimovic, banned for slapping a defender against Napoli, fired an early warning when he had a shot saved by Viviano after only three minutes.
Despite the absence of Philippe Mexes, himself starting a three-match ban for violent conduct, and the injured Kevin-Prince Boateng, Alessandro Nesta and Alexandre Pato, Milan were in total control with Urby Emanuelson twice close to scoring.
It was therefore no surprise when they went ahead, Robinho threading the ball to Ibrahimovic who fired into the roof of the net.
Palermo, unbeaten at home against Milan since 2006, nearly equalised in a goalmouth scramble 10 minutes later but instead Milan broke, Robinho fed Ibrahimovic and the striker skipped past a tackle before scoring with a casual toe-poke.
His crowning moment came four minutes later when he curled a left-foot shot beyond the bemused Viviano.
The goalkeeper denied Ibrahimovic a fourth goal before the break as Milan could easily have doubled their tally.
The visitors, who have scored 53 league goals this season, eased off in the second half but still got a fourth when Thiago Silva rose to head in El Shaaraway's cross in the 58th minute.
"The chance of ending Palermo's recent run of wins against Milan in the last six years gave us an extra incentive," said coach Massimiliano Allegri.
Juventus repeated their habit this season of starting well at home and then fading in the second half.
De Ceglie headed Juventus in front in the 18th minute after Giorgio Chiellini's header rebounded off the post following a free-kick.
Despite their early lead, Juve struggled to create chances with Mirko Vucinic repeatedly losing the ball as he tried to go it alone, frustrating his striking pa