Editor's Note: The following story contains spoilers regarding the show "House." If you'd rather not know what happens, stop reading now.
Kal Penn, left, with Peter Jacobson on "House," is joining the Obama White House.
LOS ANGELES, California (CNN) -- When Dr. Lawrence Kutner killed himself on the latest episode of "House: MD," it was the beginning of a new career for actor Kal Penn.
The demise of Penn's character cleared the way for the actor to move on to another "House," the White House.
Penn, 31, will be an associate director for the Obama administration's Office of Public Liaison.
"It seemed like something I would enjoy doing," Penn said. "I figured it was something to do."
He's not retiring from acting, just pursuing a longtime desire for public service that was rekindled when he campaigned for Barack Obama's election, Penn said.
Penn played a teen terrorist on Fox's "24" before joining the network's "House" two years ago. He's also known as Kumar Patel in the "Harold & Kumar" movie series.
The White House job likely ends his Kumar roles, he said. In fact, he will not consider any acting jobs until he leaves the Obama administration, he said.
Penn will take a big pay cut to work for the government, but he has committed to at least one or two years in the job, he said.
His focus will be as a liaison for the arts community and the Asian-American community, he said. He filled a similar role in the Obama presidential campaign, he said.
"We want to make sure that everyone's concerns are heard and they are familiar with the president's plans and proposals," he said.
Penn said he spoke briefly with Obama after the election about "trying to find the right fit" for him in the administration.
He said he has bittersweet emotions as he leaves Hollywood to search for an apartment in Washington next week.
The writers' decision to have Dr. Kutner commit suicide ensures Penn will not return to the show, although he said he leaves on good terms.
He felt "more than a little bit of shock and loss" to learn that his character would die in his final episode.
Even though he spoke no lines in the episode -- and only his legs are seen when his body is found -- he was on the set for the filming, he said.
CNN's KJ Matthews contributed to this story.