Sean Hayes and Debra Messing Credit: Imeh Akpanudosen/Getty; Jamie McCarthy/

It's a Will & Grace reunion!

Sean Hayes is set to appear in a multi-episode arc on NBC's Smash, the network confirmed Monday. When he does, he will reunite with his former Will & Grace costar, Debra Messing, featured on Smash as Julia.

Tapped to play Terrence Falls, Hayes' character is described as a TV and film star who, "due to a series of comic circumstances, becomes a major thorn in the side for Ivy (Megan Hilty) and other characters."

Hayes' Smash appointment comes six years after he and Messing wrapped their eighth and final season of Will & Grace in 2006. On the long-running sitcom, Hayes played Jack McFarland, a close friend to Grace Adler (Messing) and her gay roommate, Will Truman (Eric McCormack).

Since wrapping Will & Grace, Hayes, 42, received a Best Actor Tony nomination for his 2011 Broadway debut in Promises, Promises with Kristin Chenoweth, and earned an Emmy for hosting the Tony Awards.

Hayes isn't the only big name to appear on NBC's musical drama during season 2. Jennifer Hudson will appear as fictional Broadway actress Veronica Moore starting with the show's midseason premiere. Uma Thurman guest-starred on the series -- also featuring Katharine McPhee -- during season 1.