He also appeared as Mr. Hank Humberfloob and provided the voice of “The Fish” in The Cat in the Hat. In a 2008 interview in The New York Times, Hayes talked about a television project, BiCoastal, about “a guy with a wife and kids in California and a boyfriend in New York” for Showtime. He made his Broadway debut in the April 2010 Broadway revival of the musical Promises, Promises. He received a nomination for the Drama League Award for Distinguished Performance, and was nominated for a Tony Award for Best Actor in a Musical.
Hayes was host of the 64th Annual Tony Awards on June 13, 2010 on CBS. In 2010, he reprised the role of Mr. Tinkles, the evil white Persian cat, in Cats & Dogs: The Revenge of Kitty Galore. On November 15, 2010, he appeared in a satirical PSA for the repeal of Don’t Ask, Don’t Tell on The Daily Show with Jon Stewart. He played Larry Fine in the film The Three Stooges (2012).
Aware that his role in Will & Grace “wouldn’t go on forever,” Hayes teamed up with friend Todd Milliner, whom he met at Illinois State University, to create the television production company Hazy Mills Productions in 2004. Hayes was co-executive producer of the TV Land original comedy series Hot in Cleveland, which premiered in June 2010 and ran for six seasons. He was also a co-executive producer of the NBC series Grimm, as well as creator and executive producer on another NBC series, Hollywood Game Night. Other television series produced by the company include The Soul Man and Sean Saves the World.
Hayes and his husband, Scott Icenogle, produce lip-sync videos under their YouTube channel, The Kitchen Sync. They lip-synced to songs such as Trouble and Burnitup! He was the host of An All Star Tribute to James Burrows.
Hayes starred in the Broadway production An Act of God, June 6 to September 4, 2016 after engagements in Los Angeles and San Francisco.
In 2017, Hayes played the role of Steven, the devil emoji in The Emoji Movie.
He and his husband wrote a book named Plum, which is about how the sugar plum fairy got her wings. Hayes has always had an interest for the Nutcracker and memorized the whole musical piece.
Hayes has also guest starred as Buddy Wood on the NBC sitcom Parks and Recreation.