The 'Castle' vet will guest in an upcoming episode of the Fox cop comedy

Brooklyn Nine-Nine type TV Show network NBC

Fox genre Crime Where to watch Close Streaming Options

Brooklyn Nine-Nine is putting Nathan Fillion on the beat. Or he’s putting himself on it.

The man who previously played a mystery novelist-turned-crime solver on Castle will now assume the role of an actor who thinks he’s got the skills to be a detective simply because he played one on TV, EW has learned exclusively.

In a Grinder-like plot line, Fillion will pop up on the Fox cop comedy as Mark Devereaux, star of a Law & Order-y show titled Serve & Protect. When Jake (Andy Samberg) and Rosa (Stephanie Beatriz) investigate a crime that occurred on the Serve & Protect set, Mark wants to assist the detectives by drawing on his decade of experience playing a detective.

You’ll even meet the executive producer of S&P, Gary Lurmax, who draws in Jake with the glitz of show business. Gary is played by another famous Hollywood face: Greg Germann, whose credits include Ally McBeal and Once Upon a Time.

Firefly vet Fillion returns tomorrow night to another network comedy, Modern Family, on which he guest-stars as weatherman Rainer Shine. Fillion also appeared with Samberg in the latter’s opening bit of the 2015 Emmys.

Brooklyn Nine-Nine returns for the second half of its fourth season on Apr. 11, and the episode with Fillion and Germann airs sometime this spring. The fall finale ended with a bang — a city bus knocking Gina (Chelsea Peretti). To read six reasons why she’s definitely dead —and six more why she’s actually alive — click here.