Franco Vazquez was dismissed midway through the first half as the top-flight outfit slipped to a 3-2 defeat, with Alessandria booking another trip to Serie A opposition as they travel to face Genoa in the next round.
The hosts fell behind early on to a Massimo Loviso penalty before their task was made harder by Vazquez's red card.
Michele Marconi added a second for the visitors just moments later as Luca D'Angelo's side went in at half-time two goals up.
Palermo looked set to stage a comeback as Aleksander Trajkovski pulled a goal back 10 minutes after the interval and the same player then hit the crossbar.
But it was the Lega Pro side who wrapped up the game with eight minutes remaining as Gianluca Nicco added a third - which was enough to send Alessandria through despite Alberto Gilardino's late strike.
Alessandria's Lega Pro rivals Pavia did not have as much joy as they were knocked out by Verona.
Serie A's bottom side avoided an upset with a 1-0 victory at Stadio Marc'Antonio Bentegodi as substitute Claudio Winck struck in injury-time.
Luigi Delneri's side have yet to win a game in the league this season but will now face Napoli in the fifth round.
Meanwhile, Udinese won an all-Serie A clash as they saw off Atalanta with Antonio Di Natale hitting a brace in a 3-1 victory.
The 38-year-old veteran opened the scoring with a fourth-minute penalty but Gaetano Monachello levelled for Atalanta shortly after half-time.
The hosts re-established their lead through Chelsea loanee Stipe Perica before Di Natale's second secured safe passage and a trip to Lazio in round five.