Eran Zahavi opened the scoring for the home side in the first minute before Giulio Migliaccio saw his goal disallowed three minutes later.
Nicolas Bertolo then beat Cagliari goalkeeper Michael Agazzi to put Palermo 2-0 up before Fabrizio Miccoli made it three when his free-kick curled into the net.
Daniele Conti pulled a goal back for Cagliari with six minutes to go before Radja Naiggollan scored their second in injury time.
The loss puts the breaks on Cagliari's excellent start to the season, having previously taken maximum points in the first two weeks of the campaign
Zahavi's first-minute strike set the tone for the game, his powerful shot finding the top-right corner from outside the area.
Migliaccio saw his goal ruled out three minutes later due to what appeared to be a dubious offside call when he got on the end of a 25-yard Miccoli free-kick.
But Palermo found the back of the net again in the 15th minute when Bertolo linked up with Miccoli to turn the ball past the right post from close range.
The home side went 3-0 up after the break when Miccoli's free-kick beat Agazzi after the keeper came out of his net to catch the ball but missed.
Conti finally got a goal back for Cagliari in the 84th minute, but it was too little too late, even when Naiggollan's 15-yard shot beat Alexandros Tzorvas in injury time.