The uninhibited comedian inside Ken Jeong — you might remember him as the lunatic named Mr. Chow who sprang stark naked from a car trunk in “The Hangover” — was born 25 years ago, on a high school stage, in a swimsuit competition to anoint the next “Mr. Buccaneer.”

That mock male beauty pageant at Greensboro, N.C.’s Page High School (home of the Pirates!) gave Jeong, a self-described “popular geek,” his first opportunity to risk making a complete fool of himself in public — but also to make people laugh.

“My close friends knew I was funny, but I was not like a class clown or anything like that,” Jeong says. But by the end of the Mr. Buccaneer show — after the then-16-year-old posed in his swim trunks “like Lou Ferrigno,” performed a heartfelt cover of the Commodores’ “Three Times a Lady” and earned two standing ovations — everyone present on that night in May 1986 knew exactly how funny Ken Jeong was.

Still, nearly two more decades would pass before Jeong, 41, would funnel that comic energy into a full-time career as a film and television actor, most notable for his role as Chow in “The Hangover” and “The Hangover Part II,” which opens Friday, as well as his part as the unstable former Spanish teacher Ben “Senor” Chang on NBC’s “Community.”

First, Jeong would go to med school, become a doctor, moonlight for years in comedy clubs and, later, at a crucial moment in his career, find out that his wife, also a physician, had breast cancer.

“What do you call the guy who graduates last in your class at med school? Doctor,” Jeong says. He laughs, his enjoyment of the old joke still contagious even though he’s talking via telephone from his home in Los Angeles. “You know? It’s a guaranteed, stable profession. And you’re doing good, and you’re helping people. There were so many factors in play at that time that medicine was just more appealing.”

So Jeong stuck with his pre-med studies at Duke University and put acting on the back burner. It was a difficult decision, one that led to some intense discussions with his parents, who wanted a stable profession for their son.

“I promised him that if he got into medical school, I would give him the opportunity to develop his hobby and go anywhere in the world to develop his hobby,” Jeong’s father, retired economics professor D.K. Jeong, told the Greensboro News & Record in 2009.

So Jeong got his MD (specialization: internal medicine) in 1995 at the University of North Carolina at Chapel Hill, then pursued his residency in New Orleans. While there, he won the Big Easy Laff-Off, a contest judged by Budd Friedman, founder of the original Improv comedy club in New York, and former NBC chief Brandon Tartikoff. That landed Jeong the opportunity to perform for two nights at the Improv in Los Angeles, which ultimately led him to establish roots in California.

In Los Angeles, Jeong worked two jobs. During the day, he treated patients at an HMO clinic. At night, he scooped up as many stand-up gigs as he could, for a “lucrative” $10 to $25 a spot. His goal? To somehow parlay all that joke-telling into a career as an actor.

Occasionally, his dual lives intersected. Patients would realize that the mild-mannered internist in the white coat diagnosing their illnesses was the same one they had seen the night before, dropping f-bombs onstage at the Laugh Factory.

“The ultimate compliment to me from a patient was ‘I could never imagine a guy like you could do comedy,’ ” he says.

Jeong finally scored the break he coveted when Judd Apatow cast him in the 2007 comedy “Knocked Up.” The role, appropriately, was as the brusque doctor who delivers Katherine Heigl’s baby.

“Seth Rogen and Evan Goldberg, the executive producers of ‘Knocked Up,’ told me, ‘We really believed you were a burned-out doctor,’ ” Jeong recalls. “And I told them, ‘That’s because I am.’ ”

A rapid rise

After “Knocked Up” became a massive hit, Jeong walked away from medicine and began to pursue acting full time, even though he enjoyed life as a doctor. “There was a part of me that was very, very happy, except for the performance part,” he says. “But in terms of being a functioning member of society, I had it made.”

The supporting parts came quickly. In 2007, he shot multiple pictures back-to-back, including “Role Models,” “The Pineapple Express,” “Step Brothers” and “All About Steve.” Then in 2008, he was cast in the film that cemented his status as America’s go-to wild and crazy Asian: “The Hangover,” the blockbuster R-rated comedy that introduced audiences, via Mr. Leslie Chow, to Jeong’s flamboyance and his willingness to go full frontal. (The nudity in that leaping-from-the-car-trunk scene? Totally Jeong’s idea.)

“I am totally uninhibited at the risk of making myself look idiotic,” he admits.

But that’s what Todd Phillips, director of “The Hangover” movies, cites as Jeong’s greatest asset.

“Ken has fearlessness almost more than anybody I’ve ever worked with,” he says.

“When I feel like we have the shot or the scene in the can, I’ll say to him, ‘Hey, Ken, let’s do a free one,’ ” Phillips adds. “Which is his signal that he can just let go and do anything. And those free ones usually run a whole roll of film, which is 11 minutes long. Because he just doesn’t stop. It’s awe-inspiring. And then the best part is, you go, ‘Cut,’ and he goes, ‘How was that? Did I do okay?’ It’s like two different people.”

Actually, in a way, Jeong was two different people while shooting “The Hangover. ”

When the cameras rolled in Las Vegas, he was Chow, a gangster who engaged in blackmail and tittered at Zach Galifianakis for being fat. Off-camera, he was a husband eager to get back to Los Angeles, where his wife was seriously ill.

“That whole experience of ‘The Hangover,’ for me, was therapeutic,” he says. “It was my primal-scream therapy.”

‘Hangover’ as therapy

Ask Jeong about his wife, Tran Ho — who practices family medicine — and at first he’s all jokes.

“I don’t know her name,” he says, laughing. “She was just an actress the studio provided me to make me look legit.”

But his deep affection for her quickly becomes obvious. The two met at a happy hour for young doctors and immediately hit it off. “We were the Bruno Kirby and Carrie Fisher characters in ‘When Harry Met Sally,’ ” he says.

They married in 2004. In 2007, they became the parents of twin girls, Alexa and Zooey. And in 2008, as Jeong was poised to start filming “The Hangover,” Tran got the breast cancer diagnosis.

“I was close to not doing ‘The Hangover’ because she’d just started the chemo,” he says. But his wife insisted that he seize the opportunity. Only Phillips and Jeong’s co-star and friend Bradley Cooper were aware of Tran’s illness.

“In a weird way, what Tran went through informed the character and made him that much more maniacal,” Phillips says. “Because it was really a release for Ken.”

Fortunately, she responded to treatment. In 2010, she learned that, as Jeong clinically put it, “Her tumor markers were normal, which meant that the cancer level in her blood was negligible.”

Translation: She was cancer-free and had officially beaten the disease.

If the first “Hangover” was therapy for Jeong, shooting the sequel in Bangkok last year was, in his words, “a celebration” — of reuniting with friends from the first film, of his family’s good health and of the fortune he’s found in Hollywood.

His daughters will turn 4 on May 26, the day “The Hangover Part II” is released. He gleefully shares that they know their father is an actor and frequently watch him on NBC’s “Community.” (They can see him Sunday night hosting the Billboard Music Awards on ABC.)

But what do the girls want to be when they grow up?

“They actually say they want to be a doctor,” he says. “I don’t mind what they do. It would be hypocritical for me to mind what they do. But they want to be like Mommy. I could not be any happier.”