“American Idol” alum Chris Daughtry is heading back to Fox.

The rocker has been cast in a recurring role in the “Studio City” pilot, Variety has learned.

Daughtry — who’s the front man of the Grammy-nominated band Daughtry, which he formed, after his “Idol” elimination — will play a Keith Rhodes, a drug-addicted rock star. He will also write original music for the series.

The musician joins “Will & Grace” star Eric McCormack who will topline the hourlong dramedy, as a singer-songwriter who turns out to be a celebrity drug dealer. British actress Florence Pugh has been cast as McCormack’s singer daughter, Cat, who navigates her journey to stardom and holds onto her big dreams, despite living under the same roof as her drug dealer father. Heather Graham will also co-star in the pilot.

While Daughtry is widely known as a singer-songwriter, he’s tried his hand at acting with a guest role on the 100th episode of “CSI: NY” in 2008, also playing a musician.

Daughtry is the second Fox reality competition alum to join “Studio City.” Jeanine Mason, who won Season 5 of “So You Think You Can Dance,” has also been set as a series regular. Coincidentally, Daughtry also competed in the fifth season of “Idol.”

The coming-of-age story comes from the team behind “Shameless,” Krista Vernoff, Andrew Stearns and John Wells who will all serve as exec producers. The project was inspired by the real-life experiences of Vernoff, who penned the pilot. “Empire” director Sanaa Hamri is attached to direct. John Wells Productions and Warner Bros. TV will produce.

Daughtry is repped by Dan Kim and Jeff Frasco at CAA, and Strling Mcilwaine at Pearl Group Entertainment.