The premise of the eighth Chief Inspector Gamache mystery sounds like ye olde Gothic novel boilerplate, so it’s a testament to Louise Penny’s subtlety as a writer that “The Beautiful Mystery” is so fresh and fully realized. In their latest case, Gamache and Inspector Jean-Guy Beauvoir, his sidekick in the Surete du Quebec, venture into a world largely untouched by modernity but, regrettably, not untouched by sin.

This singular adventure begins when our detectives receive word that a monk has been murdered in the northern forests of Quebec province. Flying up in a Cessna and then riding upriver in a small aluminum boat, the pair arrive at Saint-Gilbert-Entre-les-Loups, a 200-year-old abbey that houses 24 (er, make that 23) cloistered, contemplative monks. Until recently, the Gilbertines, as these monks are called, were believed extinct: Indeed, the Catholic Church had long ago struck the Gilbertines off its list of “living orders.” (As readers learn, the Gilbertines sneaked out of Europe during the Inquisition and were only too happy to be forgotten by the Vatican and its minions.)

But where the Inquisition failed, the Internet triumphed. A few years earlier, the monks made an amateurish recording of Gregorian chants; it went viral, exposing their existence. Ever since, tourists from around the world have been turning up at the abbey’s door, desperate to discover the source of spirituality that the chants convey. Every visitor has been rebuffed, till now. When Gamache and Beauvoir arrive, the abbey’s solid wooden door reluctantly opens because “their ticket was a dead man.” And not just any dead man: The victim discovered in the abbey’s walled garden with his skull bashed in turns out to be Brother Mathieu, the choirmaster who was the force behind the monks’ monster hit. The detectives find a scrap of vellum in Brother Mathieu’s fist with some “neumes,” or ancient musical notations, scrawled on it. Could this scrap come from a manuscript that would provide the long-sought-for solution to the “beautiful mystery” of the origins of Gregorian chant? Gamache and Beauvoir settle into spartan cells at the abbey to crack these and other even more vexing mysteries.

The dual draw of Louise Penny’s series is her Quebec settings and the psychological acuity with which she develops the relationship between Gamache, the crusty man of integrity, and the more fragile Beauvoir, who’s been scarred by his close encounters with violent death. Here, Penny’s setting is so haunting that she can perhaps be excused for going on a tad too long throughout the first third of this book in describing the atmosphere of the abbey. When the detectives enter, we’re told that Gamache is stunned by the quality of the light refracted through the leaded windows:

“The corridor was filled with rainbows. Giddy prisms. Bouncing off the hard stone walls. Pooling on the slate floors. They shifted and merged and separated, as though alive. The Chief Inspector knew his mouth had dropped open, but he didn’t care. He’d never, in a life of seeing many astonishing things, seen anything quite like this. It was like walking into joy.”

This is gorgeous writing, and it’s certain to whet a reader’s desire to make a pilgrimage to whatever site inspired the mythical Saint-Gilbert-Entre-les-Loups. The sluggish plot quickens, however, when Gamache’s nemesis, Chief Inspector Francoeur, turns up at the abbey’s door, followed, in short order, by a young Dominican monk sent from Rome on a mission from the Congregation for the Doctrine of the Faith — today’s incarnation of the Inquisition. It’s not for nothing that, in Latin, “Dominican” can mean “The Hound of the Lord” (Domini canis). This shrewd monk goes snout-to-snout with Gamache, sniffing out the rot underlying the heavenly aspirations of the abbey.

By its conclusion, “The Beautiful Mystery” transforms itself, unexpectedly, into an emotionally harrowing tale. Not only are the vicious tensions among the monks exposed, but so, too, is a terrible rift between Gamache and Beauvoir. Early on, Gamache ponders the purpose of the abbey’s thick, high walls and locked doors: “Was it to keep the sins of the world out? Or to keep something worse in?” The revelations that follow ultimately remind Gamache of what he already knows: that despite the best defenses, evil is always in the air.

Corrigan, book critic for the NPR program “Fresh Air,” teaches literature at Georgetown University.