Bobby Moynihan will depart “Saturday Night Live” following the sketch-comedy franchise’s season finale this weekend.

Moynihan’s exit from the show had been expected since CBS last week picked up comedy series “Me, Myself, & I,” in which he is set to star, for the 2017-18 season.

This season was Moynihan’s ninth on “SNL” — placing him among the longest-running cast members in the show’s history. In the current cast, his tenure was exceeded only by that of colleague Kenan Thompson.

Moynihan, like so many “SNL” veterans, developed his own stable of recurring characters, including Drunk Uncle and secondhand reporter Anthony Crispino. Among the real-life people he impersonated on the show were Chris Christie, Guy Fieri, and Snooki.

On Wednesday, Moynihan appeared at CBS’ upfront presentation with his fellow “Me, Myself & I” cast members. The single-cam comedy examining one man’s life over a 50-year span — with Moynihan playing the protagonist at age 40. Kapital Entertainment is producing in association with Warner Bros. Television. Writer Dan Kopelman is executive producing with Aaron Kaplan, Dana Honor, and pilot director Randall Einhorn.

Saturday’s episode of “Saturday Night Live” will be the last of the show’s 42nd season. “Baywatch” star Dwayne Johnson is set to host with musical guest and new “American Idol” judge Katy Perry.