Three Bags Full: A Sheep Detective Story by Leonie Swan. So marvelous and unexpected that I need to post the blurb from the back cover:
A witty philosophical murder mystery with a charming twist: the crack detectives are sheep determined to discover who killed their beloved shepherd.
On a hillside near the cozy Irish village of Glennkill, the members of the flock gather around their shepherd, George, whose body lies pinned to the ground with a spade. George has cared for the sheep, reading them a plethora of books every night. The daily exposure to literature has made them far savvier about the workings of the human mind than your average sheep. Led by Miss Maple, the smartest sheep in Glennkill (and possibly the world), they set out to find George’s killer.
The A-team of investigators includes Othello, the “bad-boy” black ram; Mopple the Whale, a merino who eats a lot and remembers everything; and Zora, a pensive black-faced ewe with a weakness for abysses. Joined by other members of the richly talented flock, they engage in nightlong discussions about the crime and wild metaphysical speculations, and they embark on reconnaissance missions into the village, where they encounter some likely suspects. There’s Ham, the terrifying butcher; Rebecca, a village newcomer with a secret and a scheme; Gabriel, the shady shepherd of a very odd flock; and Father Will, a sinister priest. Along the way, the sheep confront their own all-too-human struggles with guilt, misdeeds, and unrequited love.
It's hilarious - I've read it many times.