The group will play "The End is the Beginning" on the crime drama.

Ozzy Osbourne and the Black Sabbath gang will rock during a cameo in CSI's season finale.

In the lead-up to the release of their upcoming album, titled 13, the band will appear in the finale of the crime drama on May 15, CBS announced Wednesday.

STORY: Black Sabbath Announces New Album, First With Ozzy Since 1978

The band will play a concert in the show attended by some of the characters. The performance in CSI will debut the first single, "End of the Beginning," from the group's new album.

"When we first heard that Black Sabbath was interested in premiering a song on CSI from their first studio album in 35 years, we were all really excited," said the show's executive producer, Don McGill, in a release. "So many of us are longtime fans."

The group had planned to release its 19th album in fall 2012, but rescheduled to June 11, 2013.