Sean Hayes and I are sitting in a green room on the soundstage in Los Angeles where the Will & Grace revival is being filmed. We’re talking about... I don’t know what. Everything: Liam Payne’s new song, Ben Platt’s career, my dating life, his producing career, getting back into Jack McFarland’s shoes, and the episode he’s shooting at the moment, in which he and Eric McCormack as Will accidentally drug themselves and hash out their feelings about Jack’s impending marriage while hallucinating butterflies.

But somewhere in the middle of our conversation while I was on set this August, I start hearing the tinkle of piano keys. Very loudly, someone is singing the torch song, “The Man Got That Away.” It’s fabulous, but obtrusive. Do they always play the radio that loud, I ask him? “Kevin, that’s Megan,” Hayes says.

Unbeknownst to me, my reporting day on the Will & Grace set coincided with one of the most emotional episodes Megan Mullally has filmed as Karen Walker. In the episode that aired Thursday night, “Family Trip,” Mullally’s Karen comes to terms with the fact that she is about to be divorced from her husband and delivers what’s ruled her “last performance” as Mrs. Stanley Walker.

NEWSLETTERS The Daily Beast’s Obsessed Everything we can’t stop loving, hating, and thinking about this week in pop culture. Subscribe By Clicking "Subscribe" you agree to have read the Terms of Use and Privacy Policy

In a riff on Will and Jack’s parallel hallucinatory storyline, Karen daydreams herself at a cabaret bar, saying goodbye to Stanley and her past identity attached to him by crooning the ballad at the piano. NBC is keenly aware of what a big moment having Mullally as Karen sing “The Man That Got Away,” a song made famous by Judy Garland in her version of A Star Is Born, will be for Will & Grace fans. It teased the episode this week on Twitter touting, “Megan Mullally will have your jaw on the floor.”

I was there during rehearsals. They’re not wrong.

Mullally has a Broadway background, having starred in How to Succeed in Business Without Really Trying, Grease, and Young Frankenstein, and she is a member of the band Nancy and Beth. She sang on Will & Grace once before, a duet of Nat King Cole’s “Unforgettable” with Sean Hayes that makes me cry every time I pull it up on YouTube. But this was different. Because it was a fantasy sequence, Mullally didn’t have to sing in character as Karen. She could belt, perform, and feel the song the way she would if she were performing it at a cabaret herself.

The rafters were shaking on the soundstage as she rehearsed. Every crew member on set gathered around to listen to her sing, including the entire cast and guest stars Chelsea Handler and Mary McCormack. At the end of each belt, everyone would look at each other and mime chills.

“I taught her how to sing,” Jim Burrows, the TV legend who has directed every episode of Will & Grace, quips when I ask him about it. He loves it when the show dabbles in gravitas, shading the neuroses of these characters. “You have to bend a lot of stuff to get Megan to sing that way,” he says. “Karen would never sing the way she sings there. By making it a fantasy Meg-y can sing her chops off.”

About an hour later, Mullally is satisfied with her rehearsals and we meet to talk about the episode. She shares Burrows’ excitement about delving into more emotional parts of Karen’s otherwise boozy-kooky psyche.

“There wasn’t a ton of it in the first eight seasons,” she says. “I remember specifically an episode where Karen wanted to have a child but then realized it wasn't going to happen. Then I remember another episode where Stan was in the hospital and she was acting really tough but underneath she was scared and vulnerable. But I don’t remember a lot of other times.”

It’s a reminder that Karen, as fun as she is to laugh with, is a real person—and because the revival has taken such care to chronicle the ways in which these characters have matured, Mullally gets to play that. “It’s good to have that storyline where there’s a divorce,” she says. “In as much as there’s been so many jokes made about Stan over the years, she really does love him.”

Speaking with everyone involved in Will & Grace, there’s a sense of enjoyment in the fact that the show has earned the right, after creating so much history with these characters and their relationship with the audience, to delve deeper in the revival. An earlier episode this season showcased Debra Messing’s dramatic talents in an episode that had Grace sharing her own #MeToo story, earning her Golden Globe and Critics Choice Award nominations. The nuance with which the series has portrayed Jack and Will’s evolving friendship as gay men and best friends getting older has also earned praise.

“I sometimes think that if this was a show that was starting out and Karen was doing these things you wouldn’t accept it,” series co-creator David Kohan says. “It had to be built over time. There are so many things, punchlines that are just a look that require a real familiarity with who the character is and where the character is coming from in order to appreciate the joke. It makes me glad that this is a returning show, that you don’t have to build up all that equity with the audience to deliver something.”

Including delivering something as gorgeous as Mullally’s performance, which I still can’t believe I got to see her rehearse several times. Co-creator Max Mutchnick winks at me as I leave. “You lucked out.”