Comedian Kevin James is most famous for his role as the slightly overweight lead character on the hit sitcom "The King of Queens," but worked to shed that image — literally — for his latest film.

James plays a biology teacher who takes up mixed martial arts fighting — the style popularized by the Ultimate Fighting Championship — to raise money for his school in the new movie "Here Comes The Boom," which also stars Salma Hayek.

The actor revealed that he was unhappy with his current weight and that he worked tremendously hard to lose weight for "Here Comes The Boom," in which he appears shirtless during his fight scenes.

James discussed the weight loss on a recent appearance on "The Late Show With David Letterman."

"I got on the scale and it read 290 pounds. I realized I was only 10 pounds away from 300. I got to 302," James said. "Now I'm down to about 260 pounds. I want to be there for [my family]. That's important."

In an interview with CNN, James said he recognized that his physical condition wasn't where it should be and he knew the importance of getting healthy and staying in shape.

"I threw my back out ... getting into a town car. That'll show you the kind of shape I'm in now. How far I've let myself go," he said.

The role as an MMA fighter is something different for James, who is more commonly known for his work with bumbling comedic characters.

James said some skeptics thought the new film was "just going to be Paul Blart falling around a ring, being the fat guy, tripping over his own feet. But the UFC gave us their blessing to make this movie. ... I had to promise them I'm going to make this thing as realistic as possible and it's going to be something that they haven't seen in me before."