Sean Maher, who plays Sean in NBC's The Playboy Club, says he's gay and the closet made him miserable.

Maher is best know for playing Simon Tam in the science fiction series Firefly. He reprised the character in the follow up film Serenity.

The 36-year-old Maher discussed his personal life in an interview with Entertainment Weekly.

He told the entertainment glossy that he's been in a relationship with boyfriend Paul for nine years and the couple is raising two children, Sophia Rose, 4, and 14-month-old Liam Xavier.

Maher said he was nervous, but added that coming out was “liberating.”

“This is my coming out ball,” he said. “I've been dying to do this.”

He recounted that after landing his first acting job in his early twenties he decided to hide his sexual orientation.

“I was young, I was 22. I didn't know anything. So that sort of started the idea of, okay, well, I'm working a lot, I guess I'll just keep that gay part of my life on the back burner nor now. I went so far as to sleep with women a couple of times. It was a very confusing time for me.”

“I was so miserable,” he added. “And you just don't realize that it's eating away at your soul.”

Maher said having a family turned him around: “I have these beautiful children and this extraordinary family, and to think in any way shape or form that that's wrong or that there's shame in that or that there's something to hide actually turns my stomach.”

In The Playboy Club, Maher plays Sean, the husband of Bunny Alice (played by Leah Renee). But their marriage is for show and both characters are gay.