The Manxman was led out perfectly by team-mate Gert Steegmans and surged clear of Norway's Edvald Boasson Hagen and Slovakian Peter Sagan.
It was Cavendish's first stage win of this year's Tour and his 24th in total.
A large pile-up in the final kilometre split the peloton but Simon Gerrans retained the leader's yellow jersey.
American rider Teejay van Garderen and Belgium's Jurgen van den Broeck, who was fourth in last year's race, were among those to go down in the crash.
34 - Eddy Merckx (Bel) 1969 to 1975
28 - Bernard Hinaut (Fra) 1978 to 1986
25 - Andre Leducq (Fra) 1927 to 1935
24 - Mark Cavendish (GB) 2008 to present
Britain's Chris Froome stayed out of trouble and remains seventh overall, three seconds back, after finishing with the same time as Spain's Alberto Contador and Australia's Cadel Evans, who are seen as his major rivals for the general classification.
But the day belonged to Cavendish, who had endured a frustrating time in the opening days of the Tour as well as suffering from illness.
The 28-year-old was denied a chance of victory - and taking the yellow jersey - after being held up in a crash at the end of stage one, and missed out on the podium on Tuesday when his Omega Pharma-QuickStep team were denied victory by 0.75 seconds in the team time trial.
This time, however, there was no stopping Cavendish - despite rumours circulating during the stage that he was still on antibiotics and would not be contesting the final sprint.
An early breakaway of six riders escaped after 3km of the 228.5km stage from Cagnes-Sur-Mer to Marseille but the last survivor, Kazakhstan's Alexey Lutsenko was caught with 3km to go.
"This stage was always going to come down to a sprint finish. It appeared there was a chance that the breakaway riders could stay clear but their lead came down very quickly before the end.
"That left us with a sprint and Mark Cavendish won very convincingly in the end. We were unsure how he would do because he has been under the weather but his team worked well for him and he made it look pretty easy.
"Now we know he is in good shape and he will be going for another win on Thursday. He might even get a chance on Friday, depending on how he is feeling before the race enters the Pyrenees.
"For me, Mark Cavendish has to not think about winning the points category. His main objective is to win stages and if he does that, the green jersey will take care of itself.
"He has got a very difficult job to beat Peter Sagan anyway because Sagan will pick up points where Cavendish will not figure."
Listen to 5 live's stage five podcast
That set up the first bunch finish featuring the fastest men on this Tour, and it did not disappoint.
Cavendish stuck to Steegman's wheel before making his move with 250m to go and, although Boasson Hagen held off Andre Greipel to follow in his slipstream, neither he or the fast-finishing Sagan came close to denying him.
The Isle of Man rider raised his arms in triumph as he crossed the line, and is now only 10 wins short of Eddy Merckx's record of 34 Tour de France stage wins.
"I'm super happy," said Cavendish afterwards. "Now the pressure is kind of off and hopefully it has started the ball rolling.
"It would have been nice to win on Tuesday but it's not to be underestimated how hard it is to get one stage win on this race.
"I didn't feel great but when the guys are committed like they were - not just in the final, but all the way today - it's important to pay them back.
"They show their motivation by riding themselves into the ground and, like I always say, that really does give you something extra. If I'd lost that sprint, I really wasn't paying the lads back."
His Omega Pharma-QuickStep team manager Patrick Lefevere added: "We had targeted this stage.
"A lot of good sprinters [have] won in Marseille and Mark, who loves the history of cycling, wanted to have his name associated with Marseille."
Cavendish's win sees him move up to second in the points category with 76 points, 35 behind Sagan in the battle for the green jersey.
"I lost a couple of points to Cavendish but that's okay, the important thing is to not lose too many," Sagan said. "Mark is the fastest man in the world, it's almost impossible to beat him."
Thursday's sixth stage, a flat 176.5-km ride from Aix-en-Provence to Montpellier, gives Cavendish a chance for another victory.
He needs one more stage win to move level with Andre Leducq in third place on the Tour's all-time list of stage winners. Other than Merckx, only Bernard Hinaut, with 28, has more.
Results of stage five:
1.  Mark Cavendish (GB) Omega Pharma - Quick-Step 5:31:51"
2.  Edvald Boasson Hagen (Nor) Team Sky            SAME TIME
3.  Peter Sagan (Slo) Cannondale
4.  Andre Greipel (Ger) Lotto
5.  Roberto Ferrari (Ita) Lampre
Selected others:
27. Cadel Evans (Aus) BMC SAME TIME
28. Chris Froome (GB) Team Sky
39. Alberto Contador (Spa) Saxo-Tinkoff
99. Peter Kennaugh (GB) Team Sky
182. Geraint Thomas (GB) Team Sky +10.08"
183. David Millar (GB) Garmin-Sharp SAME TIME
190. Ian Stannard (GB) Team Sky
Overall classification after stage five:
1.  Simon Gerrans (Aus) Orica                       18:19:15"
2.  Daryl Impey (SA)  Orica                      SAME TIME
3.  Michael Albasini (Swi) Orica
4.  Michal Kwiatkowski (Pol) Omega Pharma - Quick-Step +1"
5.  Sylvain Chavanel (Fra) Omega Pharma - Quick-Step  SAME TIME
Selected others:
7. Chris Froome (GB) Team Sky +3"
9. Nicolas Roche (Ire) Saxo-Tinkoff +9"
12. Alberto Contador (Spa) Saxo-Tinkoff +9"
17. Daniel Martin (Ire) Garmin +17 sec
26. Cadel Evans (Aus) BMC +26sec
90. Peter Kennaugh (GB) Team Sky +9'18"
95. David Millar (GB) Garmin +10'25"
146. Mark Cavendish (GB) Omega Pharma-Quickstep +26'50"
176. Ian Stannard (GB) Team Sky +36'11"
183. Geraint Thomas (GB) Team Sky +37'45"
Green points jersey standings:
1. Peter Sagan (Svk) Cannondale 111 points
2. Mark Cavendish (GB) Omega Pharma-QuickStep 76
3. Alexander Kristoff (Nor) Katusha 76
4. Andrei Greipel (Ger) Lotto 65
5. Edvald Boasson Hagen (Nor) Team Sky 58
Selected others:
6. Marcel Kittel (Ger) Argos-Shimano 57 points
Mark Cavendish defied a bout of bronchitis to claim a convincing win in a sprint finish at the end of stage five of the Tour de France.