The Iraq war veteran hoisted the mirrorball trophy with his professional partner, Karina Smirnoff.
Host Tom Bergeron called Martinez an inspiration to the audience.
The all-male finale was set up halfway through the final show when talk show host Ricki Lake was voted off, finishing third. Judges' scores combined with viewer votes determined the winner.
Judges didn't provide much extra guidance during the final competition, a samba that the dancers had to perform with little preparation time. The three judges gave both teams perfect 30 scores for their final dances.
"For one of you, that was your victory dance, but I think both of you are winners," judge Carrie Ann Inaba said. "That was a great way to end this season."
Martinez came into Tuesday's episode tied with Lake for second place. He reprised his jive routine from week two, and though he made a few mistakes, judge Len Goodman said, "You've got such a sparkling personality, you just light up this room."
Their victory brings Smirnoff her first mirrorball in 10 seasons. On Monday, she said winning would be ""a perfect ending to a perfect story."
"With everything we went through ... it's like this mirrorball would justify everything," she said. "No matter what happens, I feel like it has been such a fulfilling experience overall. But the mirrorball trophy would make it that much better. It's the truth."
Tuesday's two-hour finale also included music from Lady Antebellum and appearances by this season's former contestants: TV personalities Nancy Grace and Carson Kressley, reality star Kristin Cavallari, actors David Arquette and Elisabetta Canalis, singer Chynna Phillips, activist Chaz Bono, basketball player Metta World Peace and soccer star Hope Solo.
Kressley performed a cheeky routine to Madonna's "Vogue" that included him taking a spin with one male dancer and being dipped by another. The openly gay contestant, paired with pro dancer Ana Trebunskaya, was a fan favorite this season and has returned several times since he was eliminated from the competition to consult on fashion and bring his sense of silliness to the show.
Phillips took advantage of a second opportunity to try a "Mission Impossible" routine that she had muffed the first time around, resulting in her elimination.
After being voted off partway through Tuesday's show, Lake said she loved every minute of her experience.
"I've done something I really didn't think I could do," said the talk show host, who lost a significant amount of weight during the competition. "For someone who's a middle aged mom, I hope I made my children proud, my fiancDe and my family."
ABC is owned by The Walt Disney Co.