The Legally Blonde star was filming the romantic comedy with Paul Rudd in Washington, D.C. when they landed a last-minute viewing of the president's official residence.
But they found themselves starstruck when they came face-to-face with Obama, Vice President Joe Biden and Secretary of State Hillary Clinton.
Witherspoon tells Entertainment Weekly, "We were shooting in Washington, D.C., and we were like, 'Do you think we could get into the White House?'
"So we called somebody and got in. And while we were getting a tour, we got a message from the Oval Office that Obama wanted to say hi to us. We went to the Oval Office, and there was Hillary Clinton having a meeting with Joe Biden. It was insane."
And the high-level meeting almost became too much for the Hollywood stars when Obama praised Rudd for his performance in hit comedy I Love You, Man.
She adds, "Then Obama came out and he turned to Paul and said, 'I loved you in I Love You, Man.' I grabbed Paul and I was like (whispering), 'Are you freaking out right now?' He's like, 'I'm freaking out!' We were so tongue-tied it was ridiculous.
"Obama was like, 'What are you guys doing in town?' I started talking about the movie and I was like, 'We're doing a movie and... uh, I'm playing a character, who, uh... I'm working with Owen... uh, Owen...' I could not remember Owen's last name. And Paul goes, 'Wilson!' Like it was a party game."