As he makes his shocking exit from “The Late Show,” Stephen Colbert has landed another spot on late-night TV.

Just weeks after CBS announced it would cancel Colbert’s long-running talk show, the comedian secured a role as a guest star on the crime comedy “Elsbeth,” also on CBS.

He’ll play the host of a fictional late-night talk show, “Way Late With Scotty Bristol” on the comedy’s third season, according to Vulture.

Production on the episode took place in early August, a sign that the episode was likely planned before the network’s July 17 announcement that it would end “The Late Show” next spring.

“Elsbeth,” led by Carrie Preston, follows a quirky New York attorney as she uses her point of view to capture criminals alongside the New York Police Department.

During a February “Late Show” segment with “Elsbeth” actor Wendell Pierce, Colbert joked that he’d like to play a corpse on the show.

“I can make that happen,” Pierce responded. “I know a guy who knows a guy. We can get you on.”

The new season is set to premiere on Oct. 12 and will stream on Paramount+ on Oct. 16.

“The Late Show” will end on May 26, 2026, the network announced this summer, citing a “challenging backdrop” in television.

“We consider Stephen Colbert irreplaceable and will retire “The Late Show” franchise at that time. We are proud that Stephen called CBS home. He and the broadcast will be remembered in the pantheon of greats that graced late night television,”the network said in a statement.

The network said the decision “purely…financial” and is not “related in any way to the show’s performance, content or other matters happening at Paramount.”

The announcement came after Colbert criticized Paramount Global, the parent company of CBS, for agreeing to pay $16 million to settle a lawsuit from President Donald Trump, who sued over former Vice President Kamala Harris’ “60 Minutes” interview. The network told The Hollywood Reporter that the comment wasn’t a factor in the decision to end the show.

“I absolutely love that Colbert got fired,” Trump wrote on Truth Social. “His talent was even less than his ratings.”

Jimmy Kimmel blasted the decision via an Instagram post.

“Love you, Stephen. F*** you and all your Sheldons CBS,” Kimmel wrote, referencing CBS’s show “Young Sheldon.”

The cancellation will end years of original late-night programming at CBS that started with David Letterman in 1993. Colbert took over “Late Show” in 2015 after a high-profile stint on Comedy Central, Variety reports.

If you purchase a product or register for an account through a link on our site, we may receive compensation. By using this site, you consent to our User Agreement and agree that your clicks, interactions, and personal information may be collected, recorded, and/or stored by us and social media and other third-party partners in accordance with our Privacy Policy.