Hugh Jackman (with Lily) in The Sheep Detectives (Amazon MGM Studios)

Agatha Christie meets Shaun the Sheep meets Babe—that’s the best way to describe The Sheep Detectives. There’s certainly no precedent for this take on murder-mystery clichés, having a flock of sheep investigate a shepherd’s death in the name of love. Given how the animals are animated in a live-action world with some glaring CGI and voiced by known celebrities, this whodunit could easily have swerved between entertaining and a baaaad time at the movies. Thankfully, it is not only pleasingly charming, but sneaks in some mature themes that elevate its premise beyond a quirky family picture.

The movie’s comedy is quite Jump Street–coded, acknowledging genre tropes while openly embracing them. While its humor is more chuckle-worthy than gut-busting, The Sheep Detectives wears its heart on its wool, courtesy of a playful script by Craig Mazin of Chernobyl and The Last of Us fame, adapted from Leonie Swann’s 2005 novel Three Bags Full. Even at its most conventional, the urge to cheer for these fluffy sleuths is impossible to resist.

Like all murder mysteries, our story begins with a victim: local shepherd George Hardy (Hugh Jackman), who loves nothing more than tending to a meadow full of his flock. Every day he wakes up and performs the usual ritual: feeding the sheep, giving little lambs their bottles, and preparing medicine for the sicklier residents. George also loves reading detective and mystery novels to his sheep at night, stories the flock’s brainy leader Lily (voiced by Julia Louis-Dreyfus) loves solving in advance. Along with Lily, George saw fit to name his entire flock. There’s the elder Richfield (Patrick Stewart), the super vain Cloud (Regina Hall), the battering-happy twins Reggie and Ronnie (Brett Goldstein), youngster Zora (Bella Ramsey), and Mopple (Chris O’Dowd), who’s blessed/cursed with the ability to not instantly forget memories. They all love George just as much as he loves them.

George’s relationship with the neighboring English country town of Denbrook, by contrast, is a lot more standoffish. So, when the sheep discover his corpse one day, they’ve listened to enough books to realize everyone in town is a suspect. This pushes Lily and Mopple, aided by a cynical, loner ram adoptee named Sebastian (Bryan Cranston), to work up the courage to venture beyond their fields and investigate.

The townsfolk, as you imagine, are quite the Christie-inspired crew, including a rival shepherd (Tosin Cole), a jilted innkeeper (Hong Chau), a remorseful priest (Kobna Holdbrook-Smith), and a spiteful butcher (Conleth Hill). Haphazardly investigating on the human side is dopey policeman Tim Derry (Nicholas Braun), aided by an out-of-town reporter (Nicholas Galitzine) who sees this murder story as his big break. And that’s before George’s long-lost daughter, Rebecca (Molly Gordon), shows up, providing a long list of suspects for the sheep to remember while searching for clues.

What’s “new” about The Sheep Detectives is its shift in POV, rather than how it plays with existing formulas. If there is a flaw in the story, it’s how the movie lovingly sticks to formula so much that you never wind up surprised by where things go next. The case itself is never played for laughs; rather, the humor comes from the sheep literally stepping outside their comfort zone to do human work, with chaotic results. Because of this, the script has to juggle the sheep as investigators while observing others investigate, and sometimes even giving Derry instructions on what to look for. This results in most of the human supporting characters fading into the background, with Chau and Emma Thompson as George’s lawyer feeling particularly underdeveloped.

What’s refreshing is the movie’s willingness to be dark on top of whimsical. Beyond grappling with a murder, The Sheep Detectives finds a lot of black humor in its animal characters’ understanding of death or how other farms treat livestock. Sebastian has a deeply traumatic backstory, and a running gag that involves the sheep (save Mopple) collectively forgetting traumatic memories on cue underlies their aversion to accepting painful scenarios outside the mystery books. It’s macabre, but Louis-Dreyfus, Cranston, and the voice cast thankfully play these moments with conviction. Though the sheep’s CG’d physiques toe the line between cute and the uncanny valley, director Kyle Balda uses his past experience on Minions and Despicable Me 3 to enhance their quirks and screwball antics with largely satisfying results.

For those demanding more kids’ films of the non-IP variety, The Sheep Detectives surprisingly gets the job done, even when it feels too predictable. It might not reach the heights of Rian Johnson’s “Knives Out” trilogy, but there are unexpected layers here beyond solving the whodunit, making for a satisfying and earnest case closed.