Written with a devastating spareness by Neil Gaiman and fearsomely illustrated in shades of black by Lorenzo Mattotti, the newest version of “Hansel and Gretel” astonishes from start to finish. It doesn’t hurt that the book itself is a gorgeous and carefully made object, with a black floral motif on its pages’ decorated borders, along with abundant red drop caps and tall, round gray page numbers. (Published by Toon Books, the New Yorker art director Françoise Mouly’s venture into richly illustrated books for children, it comes in two formats, with an oversize one that includes an afterword about the evolution of the tale.) All the well-chosen detail provides an ideal backdrop for what Gaiman and Mattotti have done with the Grimm Brothers’ familiar story of the two siblings who, after being abandoned by desperate parents, outwit their witchy captor. Their rendition brings a freshness and even a feeling of majesty to the little tale. Some great, roiling essence of the human condition — our fate of shuttling between the darkness and the light — seems to inhabit its pages.

In Gaiman’s hands, the humble woodcutter’s decision to abandon his children speaks not just to the cruelty that surfaces during desperate times, but to the needless suffering and waste of war. At first, the woodcutter, his wife and their children live simply but happily. Their rural life is not romanticized — the mother can be “bitter and sharp-tongued,” while the father is “sometimes sullen and eager to be away from their little home” — but Hansel and Gretel can count on “freshly baked bread and eggs and cooked cabbage on their table.” Then war arrives, bringing soldiers, “hungry, angry, bored, scared men who, as they passed through, stole the cabbages and the chickens and the ducks.” The family’s misery is measured by their growing hunger and the emptying out of their once bustling village, until the awful choice of eliminating the children arises.

Gaiman has chosen to make the father a sympathetic, hapless character, bullied by their mother into sending the children off to their certain deaths in the woods. “It would be a monstrous thing to do, to kill our children,” the father says. “Lose them, not kill them,” the mother replies. In the Grimms’ original version, the book’s afterword explains, both parents agree that the children must be sacrificed. Then came later editions in which the mother alone is heartless. By the mid-19th century it was a stepmother who ordered the father to get rid of the children, and that’s the way most of us today know the story. Gaiman’s middle ground strikes just the right note of horror — a mother who would kill her children seems infinitely worse than a stepmother who makes the same calculation, yet having both parents plotting to off their offspring pushes the brutality too far toward hopeless despair rather than delicious terror.

Gaiman’s witch is wonderfully underplayed, more a blunt, shortsighted, bad-tempered old woman than the cackling banshee type. Inside the gingerbread house, her table is laden with “cakes and pies and cookies, with bread and with biscuits,” but she apologizes that there is no meat. War and famine have affected even the witches, it seems: These days, she reports, “often no game would come to her trap from one year to another, and what she did catch was too scrawny to eat and needed to be fattened up first.” When she deposits the drugged, sleeping Hansel into the cage to fatten him up in order to eat him, she utters only one word: " ‘Meat,’ she said happily.” Hunger is, of course, the dark drumbeat of the tale, and Gaiman notches up the volume, reminding at every turn that hunger makes us all helpless animals and potential cannibals, unable to think straight. As the starving children begin eating the gingerbread house, they let “the spicy gingerbread fill their mouths, their heads, their stomachs.”