In January 2007, Penn appeared in the first four episodes of the sixth season of 24 as Ahmed Amar, a teenage terrorist. Penn says he nearly turned down the role due to personal ethics, stating, "I have a huge political problem with the role. It was essentially accepting a form of racial profiling. I think it's repulsive. But it was the first time I had a chance to blow stuff up and take a family hostage. As an actor, why shouldn't I have that opportunity? Because I'm brown and I should be scared about the connection between media images and people's thought processes?"
Also in January 2007, he appeared in the spoof comedy Epic Movie. In May 2007, Penn received the Asian Excellence Award for Outstanding Actor for his performance in The Namesake.
In fall 2007, Penn joined the cast of the Fox medical drama House as fellowship applicant Lawrence Kutner.
On April 8, 2009, it was announced that he would join the Obama White House as Associate Director of the White House Office of Public Engagement. This caused mixed reactions from fans as this necessitated that his character be written out of the show. Not by being Put on a Bus, but by having him killed off-screen.
Prior to his political engagement, Penn taught at the University of Pennsylvania as an adjunct member in the Cinema Studies Program.
In April 2010, it was confirmed Penn will leave his post as Barack Obama's associate director of public engagement to return to his acting career.