Omega Pharma-Quick Step's Cavendish came from far back to pip Italian Elia Viviani (Cannondale) and Frenchman Nacer Bouhanni (FDJ) in an explosive bunch sprint in the shadow of Mount Vesuvius.
After time bonuses allotted to the top three, Cavendish now holds an eight-second lead over Viviani in the overall standings with Bouhanni third at 12 seconds.
The final sprint on the Naples seafront was a splintered affair after a crash inside the final two kilometres of the short 130km circuit race caused a huge split in the pack.
The Orica-GreenEdge team of Matt Goss had three men in the small leading group entering the closing straight, but the Australian - a former team-mate of Cavendish - faded in the final sprint and came home in fifth place behind young Italian Giacomo Nizzolo (RadioShack-Leopard).
Despite being isolated at the business end of the stage, Cavendish showed his strength by powering past his rivals and edge out an irate Viviani at the death.
It was Cavendish's 11th career victory on the Giro d'Italia - and the second time he has picked up the famous maglia rosa on the opening day of the race.
Asked after the stage if he felt more relief than joy, the 27-year-old Manxman said: "A bit of both. It was a difficult stage for me. With all the corners it wasn't easy. The team were incredible in staying in front but we didn't get it right at the end.
"It's cost us a lot recently but I managed to come round and win. I was in the red for most of the stage. I was so tired and it was so hot."
In stark contrast to this season's spring classics campaign, the 96th edition of Giro d'Italia started under bright blue skies and in 30-degree temperatures.
A break of seven riders - Cameron Wurf (Cannondale), Giovanni Visconti (Movistar), Guillaume Bonnafond (Ag2R-La Mondiale), Marco Canola (Bardiani Valvole), Ricardo Mestre (Euskaltel), Brian Bulgac (Lotto-Belisol) and Martijn Keizer (Vacansoleil-DCM) - formed on the first of four undulating 16.4km laps around Naples.
Former Olympic lightweight rower Wurf broke clear on the third of four ascents and soon held a gap of more than two minutes over the peloton after his fellow escapees were reeled in by the pack on the first of eight 8km flat circuits that made up the second phase of the stage.
Australian Wurf had picked up enough points over the two categorised ascents in the opening half of the stage to secure the race's first blue king of the mountains jersey. Despite numerous crashes slowing down the peloton through the narrow cobbled streets of Naples, Wurf's lead came tumbling down and the 29-year-old was swept up on the third last lap, 20km from the finish.
Cavendish's Omega Pharma-Quick Step team had controlled the stage with aplomb alongside the Argos Shimano outfit of German sprinter Degenkolb. Meanwhile the Sky team-mates of British race favourite Bradley Wiggins kept their man near the front and out of trouble - as did the Garmin-Sharp team-mates of defending champion Ryder Hesjedal.
When the race entered its decisive phase in the final lap, both OPQS and Argos Shimano suddenly found themselves lacking - with GreenEdge, Lampre-Merida and Cannondale coming to the fore. The crash inside the final 2km left only a dozen or so riders out ahead and ended the chances of Degenkolb, winner of five stages in last year's Vuelta a Espana.
Cavendish had to dig deep to first get back with the leaders and then nullify the threat imposed by GreenEdge.
But the former world champion showed just why he is considered the fastest man on two wheels with an expertly time push to the line to deny Viviani a maiden victory in his home tour.
"My friend Paul Smith is here today so it's great to get the win in front of him," said Cavendish, referring to the famous British fashion guru who designed this year's Giro jerseys.
With Cavendish sitting pretty in pink, the Giro d'Italia continues on Sunday with a 17.4km team time trial on the nearby island of Ischia.
- Sports & Recreation
- Elia Viviani
- Cameron Wurf