"He said, 'Oh you're Sean Hayes! You're in this movie … we're casting a show right now called Will and Grace — would you like to read for Will?'"
While Hayes was "totally flattered", he was also a struggling young actor, and couldn't afford to change his return flight to LA in order to make the audition.
"So by the time I got back, they'd found the amazing Eric McCormack, and they asked me to come read for 'the other guy'," he said.
"The other guy" turned out to be Will Truman's best friend Jack MacFarland, who quickly became a permanent cast member, and one of the most popular characters in TV history.
Will & Grace made its long-awaited comeback last September, 12 years on from the original series' finale.
Nostalgic fans have been desperately begging for reboots of all their favourite sitcoms for years (calls for the return of Friends will never die), but it's always a risk deciding whether a comeback will honour or ruin a show's legacy.
McCormack, Hayes, Messing and Mullally knew a revival would only work if they were all involved, so when the idea was floated, they got together for a private meeting.
"We had dinner and discussed — just the four of us — if it was something that was needed … and after much deliberation, we were like, 'Yes I think it's needed'," Hayes said.
"People are craving an escape from the real world, and I think that's why they're drawn to comedy … I love that we all decided that whether it was going to be good or not, we should give it a try."
Here are the other behind the scenes stories he shared with news.com.au:
WHEN THE CAST MET FOR THE FIRST TIME
"It was wonderful, same as it is now. We all connect on a certain actor level because we're all theatre nerds. [Even back then], we had the same sense of humour and we've grown into a family — Deb [Messing] and Megan [Mullally] are my sisters and Eric [McCormack] is my brother.
"I don't know that it would've worked if we didn't get along and feel like a family, and I don't know that we would've come back if we didn't love each other. How would we have done that?"
WHY A SPIN-OFF WOULD NEVER WORK
"I've heard that [Jack and Karen should get their own show] a lot, and I think people don't realise that the only reasons any one of the four of us is funny is because of the chemistry that is the four of us.
"A show with just Jack and Karen would be absolute insanity, and it wouldn't end up being funny. The only reason we're funny is because of Will and Grace, and the only reason Grace and Will are funny is because of Jack and Karen."
NAILING THOSE HILARIOUS ONE-LINERS
"There's so much respect there between us, we end up throwing ideas around and no-one has an ego about being told, 'Hey you should try this,' and then 'Oh my God, if I do that, you should do this,' and coming up with whatever comedy bit we need. It's very collaborative because we have so many days to rehearse before we shoot it, so the rehearsal process is an organic kind of playground for us to experiment.
"Of course, it's all written but we do have a good time experimenting with little quirks and nuances of the characters to create moments, very special moments between the characters."
ON HIS FAVOURITE GUEST STAR
"Matt Damon, because he was one of the first ones. He was so game to come on and play, and he's such a good guy. It was a really funny episode where he was a straight guy pretending to be gay in order to get into the gay man's choir, and it just made me laugh.
"Matt is super, super funny."
FILMING IN FRONT OF A STUDIO AUDIENCE
"The writers are there on show night, the night we tape, and it's like a live rock concert. The audience is usually filled with huge fans of the show, but they're there to let you know what works and what doesn't work.
"If something doesn't work, the writers rewrite on the spot and you have about 15 to 30 seconds to memorise the new line, and then you just have to quickly do it again."
ON WORKING WITH GUEST STAR MADONNA
"It was just surreal to have met Madonna and experienced her as a human being. She's always been a little mysterious, so it was interesting to see her out of her element and in ours. I'd been a fan of hers as a kid for so long.
"[She didn't remember our names] and I don't know if that was real or not, or if that was her testing us … I believe she likes to test a lot of people.
"But she was perfectly lovely, knew her lines, and was a really fun guest star."
HIS FAVOURITE EPISODE OF ALL TIME
"There's one from [season nine] called 'Grandpa Jack' which I really love. Jack learns he's a grandfather and my grandkid's parents are trying to take him to conversion therapy camp — which is a real thing, a horrible thing.
"But I love the message of that episode, and I wish that had have been on TV when I was a kid."
Will & Grace: The Revival Season 1 is now available on DVD.