The sitcom - from Parks and Recreation producers Mike Schur and Dan Goor - will follow a team of hapless detectives in New York.
Emmy-winning comedian Samberg will play the lead detective, with Schur and Goor calling the star "hilarious" in a joint statement.
"He was the first guy we thought of when we designed the part," the pair told Deadline. "From the moment we mentioned his name, everyone at Universal Television and Fox was 100% on board.
"Andy loved the pitch, and it all came together really quickly. We couldn't be happier."
Samberg was a regular performer on Saturday Night Live until May of this year, while his past acting credits include 2007 movie Hot Rod and this year's That's My Boy opposite Adam Sandler.
He currently stars in UK sitcom Cuckoo, which broke ratings records for BBC Three when it debuted last month, and is also a member of musical comedy troupe The Lonely Island.
> George Clooney Manifesto comedy pilot in works at Fox
> Gavin & Stacey US version ordered by Fox
Watch a clip of Andy Samberg on Cuckoo below: