Jon Lovett is leaving his job at the White House to pursue screenwriting in Los Angeles. (Marvin Joseph/WASHINGTON POST)

A young and witty speechwriter for an eloquent but exhausted president escapes a struggling White House and stodgy capital city for Hollywood, where he beats the odds to find fame and fortune writing comedy for more bankable stars.

So might read the script treatment about the aspirations of Jon Lovett, an Obama speechwriter and the reigning champion of official Washington’s stand-up comedy circuit. In mid-September, Lovett, 29, plans to leave the administration to write for television out west.

“It’s always been a dream of mine to write comedy and be creative,” said Lovett, who insisted that West Wing woes had nothing to do with his timing. “I would like to be able to write in my own voice.”

The transition from speechwriter in a company town governed by cutthroat power dynamics to screenwriter in a company town governed by cutthroat power dynamics would seem seamless.

Except that it almost never happens.

Lovett is the latest Washington communications professional to try to translate his skills in campaign spin, prepared remarks and news releases into entertainment for the masses. His dream of branching out, or cashing in, with a screenplay or sitcom is one New York magazine writers and editors have long harbored. They’ve had so many stories optioned — if not actually made into movies — that formal relationships between New York news outlets, talent agencies and studios have become commonplace. The success rate of Washington writers is worse, perhaps because the town’s highest accolade is “insider,” or because a city populated by self-styled alphas isn’t exactly a breeding ground for comedic angst.

“It’s a town that really showcases a pretty limited number of skills,” said Reid Cherlin, a good friend of Lovett’s, who recently left a White House communications job to pursue a writing career in New York. “When you talk about being funny, or doing entertainment, what you are really talking about is stepping back and thinking critically and making connections.”

Hollywood has valued Washington power brokers more as executives than as creative forces. Chad Griffin, a former aide to President Bill Clinton, college roommate of White House communications director Dan Pfeiffer and former partner of Kristina Schake, Michelle Obama’s communications director, works in the intersection of Washington and Hollywood as a political strategist in Los Angeles. He said there is more of a track record of people from Hollywood going on to big things in politics — Ronald Reagan, Arnold Schwarzenegger, Al Franken — than the other way around.

Kal Penn explained that the dearth of creativity in Washington left him hungering for L.A., and the lack of intellectual life in L.A. left him longing for Washington. Penn left a successful acting career for a youth outreach position in the Obama White House, and last month returned to Hollywood, where he is developing a sitcom set at the United Nations and appearing in “How I Met Your Mother.

“My view of D.C. and L.A. is that they’re almost the yin and yang,” said Penn, who described Lovett as a kindred creative spirit with whom he brainstormed short films last summer.

* * *

The thin list of notable Washington names who have worked in Hollywood includes congressional staffer turned “West Wing” writer turned cable host Lawrence O’Donnell and political consultant turned screenplay dabbler Mike Murphy. But the best current example is Eli Attie, a former Clinton White House and Al Gore speechwriter who became a “West Wing” scribe, then a successful writer and producer on the medical drama “House.” Attie, who has become immersed in West Coast ways, spoke reverently about the “craft” of television writing, of “emotional arcs” and “huge bombs.” He signed off by saying “ciao.”

Despite their shared sharkiness, the towns, Attie said, “are not really similar.” Washington, he said, is a place that rewards intelligence but not imagination, policy chops but not perspective, people who can frame arguments but not writers who think in “three dimensions.”

“In television, you have to really want to write,” said Attie, who added that a Washington ground rule dictates that speechwriters pretend never to have written any of their primary actor’s good stuff.

“And if you really want to write,” said the television writer, “why were you a speechwriter?”

For Lovett — who has interest from studios for a Washington-based political comedy and a “M*A*S*H” update — the answer lies in the apparently haphazard opportunities and chance connections that often shape a career.

After graduating from Williams College with a degree in math (and a published thesis titled “Rotating Linkages in a Normed Plane”), Lovett hit the amateur comedy clubs in New York. A chance call from a college connection got him on the 2004 Kerry campaign, which led to a stint in then-New Jersey Sen. Jon S. Corzine’s D.C. office. In 2005, he received an e-mail from Hillary Rodham Clinton’s Senate communications director asking, “Are you funny?” Clinton needed a speechwriter for a roast of Barbara Walters, and Lovett’s bits won him a spot. He took on a discreet role with the Clinton campaign, helping out chief speechwriter Sarah Hurwitz, whom he joined in the Obama White House.

He wrote many of Obama’s speeches about financial reform and his “don’t ask, don’t tell” remarks. Colleagues, who insist that Lovett is truly hilarious and not just funny by D.C. standards, said he seeded laugh lines into Rahm Emanuel’s commencement speeches and wrote jokes for Obama’s White House Correspondents’ dinner remarks, for which “Lovett went into comedy overdrive,” according to his former boss David Axelrod.

On a recent evening, Lovett rode his bike to an interview dressed appropriately for his future profession, in Saucony sneakers, jeans and an ironic T-shirt that featured the stages of the moon. (He wears only science-themed T-shirts, including ones with robots and a tippling astronaut over the words “Space Bar.”) He’s spry and self-confident, and his mumbling offstage delivery contrasts with his onstage sarcasm. In December, his comedy routine consisting of Arianna Huffington impressions and airport-security-measure zingers (“Virgin Airlines had to change their name to ‘Technically Still a Virgin’ Airlines”) edged out the midget jokes of budding comedian Grover Norquist to win Washington’s Funniest Celebrity Contest.

* * *

Next fall, two movies will compete with the candidates and cable news for the nation’s political attention span. In the first, George Clooney and Ryan Gosling will star in “The Ides of March.”

“Politics can make for a great story; the stakes are almost always unbelievably high,” said Jay Carson, a former aide to the Clintons and now a Los Angeles-based senior adviser to New York Mayor Michael Bloomberg’s philanthropic ventures. “It can also be horrifically boring,” said Carson, upon whom “The Ides of March” is loosely based. “Waiting on a 12-hour quorum call while you wait for a vote for cloture to proceed to S. Res. 2793 does not make for good television, movies or plays.”

The key, Carson said, is to make viewers feel like insiders while not boring them with the sorts of things insiders in Washington tend to obsess about.

The Clooney project will be followed by “Knife Fight,” starring Rob Lowe, a politically active “West Wing” alumnus, and written by Chris Lehane, a political consultant and former Bill Clinton staffer who made his name in the dark arts of Washington. Lehane was less bleak than Attie, his former office mate, in assessing the chances of Washington operatives in Hollywood.

“In both places, you are trying to tell stories,” Lehane said. But movies allow for multiple drafts and takes, he said, and “in politics, you don’t get the do-over.”

Lovett, who plans to stay involved with the Obama campaign in some capacity, hopes he won’t need a do-over.

The nightmare scenario, he said, is returning to Washington after his westward sojourn and asking, “Have you heard of any speechwriting positions on the Hill?”

“That,” he deadpanned, “would not be ideal.”