The veteran actor was just about to board a plane to Hawaii at Los Angeles International Airport, when he spotted a fan heading towards him, reported the New York Daily News.
"I was flying alone to Hawaii and I was waiting for my flight to board," he told "Finding Dory" co-star Ellen DeGeneres during a recent appearance on her US talk show.
"They told me the flight was boarding and... I saw a woman approaching me... I was leaving; she came up and said, 'Oh, Mr O'Neill, I love Modern Family, and you're my favourite on the show'. And I was like, 'Well, I'm here, I'm the only one here...'," (She said), 'Could you please, and I know you're in a hurry... So I said, 'Sure, fine, you know, OK'."
Spears then posted the snap on social media.
"So the next day my manager texts me and goes, 'What is this? 53,000 likes? It's Britney Spears'," the actor added.
Ed admits his daughter was not impressed, adding, "I mean, look at the look on my face - do I look like I'm sitting with Britney Spears? My daughter, Sophia, she said, 'You are a moron'.