Victoria's Hesjedal led the final climb to tear apart the leading group of breakaway riders on the 182-kilometre stage, but neither he nor Cummings could threaten Omega Pharma-QuickStep's Martin for the overall victory.
Cummings, of BMC Racing, easily won the sprint to take the stage, with Team Sky rider Edvald Boasson Hagen of Norway grabbing third. Martin finished the stage 18 seconds behind.
In the overall standings, Martin was 40 seconds ahead of Francesco Gavazzi of Astana. Boasson Hagen of Team Sky was another six seconds back.
Martin picked up his seventh victory of the year, including the team and individual time trials in the Road Cycling World Championships.
"I am super happy, over the moon," he said. "It's a really special win for me because I think there was a little bit of pressure on me. A lot of people were expecting for me to win again. I'm really proud of myself and of my teammates."
A dozen riders broke away from the pack 88.5 kilometres into the final stage, gaining more than 90 seconds on the peloton. About 20 kilometres later, Hesjedal accelerated and was followed by Cummings.
Hesjedal, the 2012 Giro d'Italia winner, said he never gave up on winning the stage.
"I believed it was possible to win until we crossed the first line," Hesjedal said. "We had very little information about the gap, and given we had 35 seconds at the top of the last climb and a few seconds of time bonus to take on the finish line, I thought I was going for final victory."
But Cummings proved to be fastest.
"I am happy after such a long day," Cummings said. "You have to try in the breakaway. It was a big breakaway, so it was difficult for the peloton to chase behind, so long as we kept the pressure on in front. When we were together, we did a good job together."
RadioShack-Nissan's Andy Schleck abandoned the stage after 26 miles due a nagging hip injury. The 2010 Tour de France champion, and runner-up in 2009 and 2011, failed to win a race this year.