With Halloween lurking around the corner, it behooves connoisseurs of the supernatural to dust off the spell books, and this year a new grimoire join the ranks. “The New Annotated H.P. Lovecraft” (Liveright, $39.95), with notes and a foreword by horror expert Leslie S. Klinger, collects 22 of Howard Phillips Lovecraft’s stories and novellas.

Virtually unknown in his lifetime, Lovecraft is widely regarded as one of the most influential pioneers of the horror and science fiction genres. He commands an impressively devoted cult following.

Lovecraft’s life was brief and outwardly uneventful. Born in 1890 in Providence, R.I., he rarely ventured forth from his home town.

His short-lived foray into marriage took him to New York, but the move, like the relationship, proved unsuccessful. Lovecraft returned to Providence alone two years later. He remained there until his death in 1937.

It’s difficult to see how such a prosaic lot could yield such fantastical fiction, but Lovecraft managed to take inspiration as it came.

“The New Annotated H. P. Lovecraft” by H. P. Lovecraft. (Liveright)

Many of his stories are set in old New England towns, locales haunted with the ghosts of their violent pasts. Others draw on Lovecraft’s disturbing dreams.

Much of his work centers around what Lovecraftians have called “the Cthulhu mythos,” a comprehensive mythology underpinning a set of linked stories.

The mythos takes its name from “The Call of Cthulhu,” a 1928 story about a sinister cult. It represents a richly detailed alternative to everyday existence, this time characterized by unnatural landscapes with impossible angles, dark woods and a recurring tome of macabre secrets called the Necronomicon.

For Lovecraft, fiction was never a reflection of reality but a rejoinder to it. He had utmost respect for the sanctity of mystery, and his stories abound with colors we cannot see and words we cannot pronounce. (In a 1934 letter, he wrote that the word “Cthulhu” represents “a fumbling human attempt to catch the phonetics of an absolutely non-human word.”)

Just like the protagonist of his story “The Silver Key,” Lovecraft turned to the “bizarre and eccentric as an antidote for the commonplace,” routinely pitting science and explanation against the unnameable and unknowable. In Lovecraft’s stories, the latter always win out.

Lovecraft spent his life in obscurity, writing serialized fiction for pulp magazines.

With the arrival of “The New Annotated H.P. Lovecraft,” the vicissitudes of canonization have smiled again on this dark master, whose foremost ambition was to elevate horror writing to the status of literature.

With detailed notes, entertaining explanation and period illustrations running along the outside margins of this oversized book, Klinger gives Lovecraft the scholarly treatment he deserves and that experts and lay readers alike will appreciate, and to his credit, he does not shirk a discussion of Lovecraft’s notorious racism, sexism and anti-Semitism.

This well-chosen selection fills in many gaps and answers many questions, without, of course, presuming to solve any of the mysteries that Lovecraft prized so highly.

Rothfeld is assistant to the literary editor of the New Republic.