Defending champion Peter Sagan (Slovakia) was able to retain his crown, with Tom Boonen (Belgium) rounding out the podium.
Nic Dougall (South Africa) was joined by Natnael Berhane (Eritrea) in an attack 3km after the start. They pulled five riders away with them to form the break of the day.
As the lead group made its way up the Arabian Gulf, the peloton gave them the gap and the advantage quickly blew out to just over 10 minutes.
Cavendish’s Great Britain squad, along with the team’s Belorussian champion Kanstantsin Siutsou, controlled the gap from the front of the main bunch.
After an 80km trip up the Arabian Gulf, the main bunch turned back towards Doha at which stage Great Britain and Belgium chose to put the race into the gutter. Minutes later the crosswinds had blown the race to pieces.
Despite a crash in training on Wednesday, Cavendish was on song and he made the 29-rider front split.
Coming into Doha and entering the 15km finishing circuit which would be completed seven times, it was the two reduced groups who remained in contention, separated by one minute.
The sprint finale was a bit messy and Cavendish initially had the wheel of Sagan.
Sagan then went right to start his sprint and Cavendish went left. Unfortunately all the traffic was on the left and he had to slow his sprint briefly to avoid colliding with Matthews.
Sagan was able to gain some ground and even though Cavendish came back to the Slovakian, there was just not enough road left.
“I feel I lost gold rather than I won silver today,” said Cavendish. “We did all we could.
“It was tough losing Luke Rowe to a puncture because we would have had three in front. But that’s how it is. It’s difficult to take any positives out of today.”
View the results here.