The controversial Androni Giocattoli sprinter negotiated a tight final bend with gusto, avoiding multiple falls to take his first career win in a Grand Tour a week after he caused a high-speed pile-up at the end of stage three in Denmark.
World champion Mark Cavendish - the main victim of Ferrari's heavily criticised swerve last week - finished a subdued fourth in his home region despite some excellent work by his Team Sky colleagues to control the race throughout the day.
After almost seven hours in the saddle under the Tuscan sun, a series of three tight bends in the final 500m disrupted the flow of the peloton at the end of a seemingly interminable 255km stage from Assisi, the longest of the 2012 Giro.
Orica GreenEdge's Thomas Vaitkus had the best line coming out of the final bend, but was passed by both Ferrari and QuickStep's Chicchi in the final straight before settling for third place.
Cavendish had to start his sprint from too far back to contend after his team mate Peter Kennaugh seemed to take the wrong line into the 90-degree bend.
Spain's Joaquim Rodriguez of Katusha retained the pink jersey. He leads Canadian Ryder Hesjedal (Garmin-Barracuda) by 17 seconds.
But there was disappointment for Frank Schleck of RadioShack-Nissan, who lost contact with the peloton during the fast closing kilometres. The Luxembourg rider rolled home 46 seconds behind winner Ferrari and drops down the overall classification.
"This is the victory of a lifetime. Winning a stage in the Giro is the best thing for an Italian rider," said Ferrari. "I wanted to redeem myself after what had happened in the early stages. I beat Cavendish? I am glad, he did not believe in me. But the only thing that counts for me is that today is a great day."
After an early start to the stage, a six-man breakaway composed of Olivier Kaisen (Lotto Belisol), Adrian Saez (Euskaltel), Simone Ponzi (Astana), Stefan Denifl (Vacansoleil-DCM), Manuele Boaro (Saxo Bank) and Mickael Delage (FDJ-BigMat) jumped clear of the bunch after 14 km.
Despite losing Ponzi ahead of the first climb of the day, the third category Poggio alla Croce, the group built up a maximum lead of five minutes and managed to stay clear until the final 30 km.
Italy's Boaro tried his luck and broke clear of the escapees as the peloton loomed. Using his strong time trialling abilities, Boaro managed to pull out a 55-second lead on the peloton and was not caught until the final climb of the day, having spent a total of 227 km off at the front of the race.
An attack by Spaniard Giovanni Visconti on the fourth category climb to Vico 12 km from the finish briefly tore the peloton apart. But Team Sky regrouped and through the brute force of veteran Jeremy Hunt the British outfit strengthened their grasp on the race.
Entering the famous spa town of Montecatini, Cavendish looked odds-on to take his third win of the race - and with it the red jersey of Australian Matt Goss (GreenEdge).
But the technical finish saw three riders, including young Italian sprinter Sacha Modolo of Colnago, hit the deck, and disrupted Sky's lead-out.
Ferrari had positioned himself on the front of the peloton and followed Vaitkus’s excellent line into the final bend. With the mayhem happening behind him - and this time, not caused by him - the bearded 29-year-old powered clear to take the win at a canter, proving just how long a week can be in cycling.
The Giro continues on Thursday with the undulating 155km stage 12 from Servezza to Sestri, which includes four categorised climbs.