"Just a few years ago I could never imagine being in my 50s. And when it comes to my approval ratings, I still can't," the president, 53, quipped at the Gridiron Club's banquet, an annual event that sees insiders and Washington's elite unwind for a night of fundraising, schmoozing and self-deprecatory humor.
Obama took on several foes, including former New York mayor Rudy Giuliani, who recently said the president does not "love" America, and the so-called birthers who believe he wasn't even born in the United States. "If I did not love America, I wouldn't have moved here from Kenya," Obama said, to wide laughter.
Obama, with less than two years remaining in office, also took a jab at the Gridiron club, noting that political analysts think the Democratic party needs to focus more on older, white voters.
"Which, is why I'm here," Obama said.
The dinner, featuring comic skits and songs, seems more suited to the Music Hall era than the Twitter age, but provides a chance for politicians and journalists, normally at each other's throats, to poke fun at one another.
The president started his speech predicting he'd get more laughs than during previous appearances at the banquet.
"I'm not saying I'm any funnier," he said. "I'm saying weed is now legal in (Washington) DC."
The nation's capital this year legalised pot possession, though the drug remains prohibited under federal law.
Obama also made a reference to the scandal swirling around Hillary Clinton, who used a personal email account on a private server while she was Secretary of State.
Saying he was once known as the young, tech-savvy candidate, Obama joked that "Hillary has a server in her house. I didn't even know you could have one of those. I am so far behind."
The president took a swipe at Republican Senator Tom Cotton, who initiated an open letter to Iran warning that a nuclear deal with the United States could be scrapped by the next president.
"You don't diminish your office by taking a selfie," he said, in a reference to criticism of a youth-oriented video filmed in the White House showing Obama take a photo of himself.
"You do it by sending a poorly written letter to Iran. Really. That wasn't a joke."