The film will tell the story of the legendary New York club that hosted bands such as Blondie and The Ramones during the punk era in the 1970s.
Malin Ackerman is starring as Blondie lead singer Debbie Harry, while Alan Rickman will play CBGB founder Hilly Kristal.
Bartha will play rocker Stiv Bators, lead singer of The Dead Boys, according to Deadline.
The cast also includes Twilight actress Ashley Greene, Harry Potter star Rupert Grint, Stana Katic, The Big Bang Theory's Johnny Galecki and Foo Fighters drummer Taylor Hawkins, who will portray Iggy Pop.
The film begins principal photography in Savannah, Georgia this July, and will then move to New York City.
The Hangover star Bartha will next be seen in Glee creator Ryan Murphy's upcoming comedy The New Normal.
Watch a trailer for The New Normal below: