Petacchi, who won 19 Giro stages between 2003 and 2005 but fractured his kneecap in stage three of last year's race, gained revenge on Australian Robbie McEwen who took Sunday's sprint.
The Milram sprinter went from a long way out and held off Gerolsteiner's Robert Förster, who made a charge on the inside, following 181 kilometres of racing from Barumini to Cagliari.
McEwen was boxed in and had to come around the outside to finish fourth behind Maximiliano Richeze of Panaria.
Pro Tour 2007
Petacchi seals victory
Enrico Gasparotto reclaimed the pink leader's jersey from team-mate Danilo Di Luca following Liquigas' victory in the time trial.
Alexandre Pichot (Bouygues Telecom) and Mikhaïl Ignatiev (Tinkoff) launched an early attack and were swiftly joined by Mickael Buffaz (Cofidis), Elio Aggiano (Tinkoff) and Giovanni Visconti (Quick Step) on a stage that featured no categorised climbs.
They built up a lead of over seven minutes before 24-year-old Visconti and Russian former world junior time trial champion Ignatiev broke clear on an uphill drag at Castladas with 65km left.
However they faced a flat ride along the coast for the last 60km towards Cagliari and their five and a half minute lead rapidly dwindled with the pair eventually caught with 4km remaining.
Ireland's Nicolas Roche burst off the front as the group went under the 1km remaining kite, while his Credit Agricole team-mate Christophe Kern took a tumble in the closing stages, but there was to be no denying Petacchi who scored his first victory at a Grand Tour since stage 21 of the 2005 Vuelta a Espana.
The riders have a rest day on Tuesday as the tour leaves Sardinia before facing a mountain top finish at the Montevergine di Mercogliano on Wednesday.
Follow LIVE coverage of the Giro d'Italia on www.eurosport.com!
Wins for Petacchi, Karpets
Ciolek ends Petacchi dominance