Each summer, Sofie took the children to a remote island in Norway, where Roald heard marvellous stories about witches and trolls, swam in the ice-blue fjords, and ate ice cream with “thousands of little chips of crisp burnt toffee mixed into it.” Yet the British boarding schools that he attended, starting at the age of nine, were mostly a misery. Much of “Boy” consists of Dahl’s recollections of beatings by his headmasters. Caning was the favored mode of punishment. “I was frightened of that cane,” Dahl writes. “There is no small boy in the world who wouldn’t be. It wasn’t simply an instrument for beating you. It was a weapon for wounding. It lacerated the skin. It caused severe black and scarlet bruising that took three weeks to disappear, and all the time during those three weeks, you could feel your heart beating along the wounds.”

When Dahl was at school, his talents seem to have gone unappreciated. A report card from Repton in 1930—which is on display at the new Roald Dahl Museum and Story Centre, in Great Missenden—offers the following assessment of his performance in English: “A persistent muddler, writing and saying the opposite of what he means. Fails to correct this by real revision or thought. Has possibilities.” This seems particularly unfair, given that the young Dahl, judging by a sample of his juvenilia at the museum—“The Life Story of a Penny”—already showed flair as a storyteller. But perhaps his teachers didn’t much approve of his nascent sympathy for the underdog—in this case, a lump of copper that must endure having “a picture of King George V’s head stamped cruelly on one side of me.”

One compensation for Dahl was that he excelled at games and sports. Being tall probably protected him from a certain amount of torment, too—as a teen-ager, he was well on his way to acquiring his adult nicknames, Lofty and Stalky. He and the other boys at Repton also enjoyed a curious perk, courtesy of the Cadbury chocolate company. “Every now and again, a plain grey cardboard box was dished out to each boy in our House,” Dahl writes in “Boy.” Inside were eleven chocolate bars—aspirants to the Cadbury line. Dahl and the other boys got to rate the candy, and they took their task very seriously. (“Too subtle for the common palate” was one of Dahl’s assessments.) He later recalled this as the first time that he thought of chocolate bars as something concocted—the product of a laboratory setting—and the thought stayed with him until he invented his own crazy factory.

Dahl is brilliant at evoking the childhood obsession with candy, which most adults can recall only vaguely. In his books, candy is often a springboard for long riffs on imagined powers and possibilities. Far from being the crude ode to instant gratification that critics like Cameron detect, Dahl’s evocation of candy is an impetus to wonder. When Billy, the boy in “The Giraffe, the Pelly, and Me” (1985), opens his own candy shop—talk about wish fulfillment!—he orders confections from all over the world. “I can remember especially the Giant Wangdoodles from Australia, every one with a huge ripe red strawberry hidden inside its crispy chocolate crust,” he says. “And The Electric Fizzcocklers that made every hair on your head stand straight up on end. . . . There was a whole lot of splendid stuff from the great Wonka factory itself, for example the famous Willy Wonka Rainbow Drops—suck them and you can spit in seven different colours. And his stickjaw for talkative parents.” The word “confection” has a double meaning in Dahl’s world—candy is a source not only of sweetness but of creativity. On a field trip recently, I sat next to three nine-year-old boys who spent forty-five minutes in a Wonka-inspired reverie, inventing their own candies.

When Dahl left Repton, in 1934, he did not go to college but instead took a job with Shell, which eventually sent him to East Africa to sell oil. When the Second World War broke out, Dahl joined the R.A.F. as a fighter pilot. “Going Solo,” the sequel to “Boy,” offers lively accounts of Dahl’s encounters with African wildlife—especially the dread black mamba snake—and eccentric British expatriates, “this pack of sinewy sunburnt gophers and their bright bony little wives.” And it contains thrilling stories of Dahl’s experiences flying missions over the Mediterranean. In 1940, he crashed in the Sahara, and suffered injuries that caved in his nose. The plastic surgeon who rebuilt the nose tried, unsuccessfully, to make it look like Rudolph Valentino’s.

When Dahl began to suffer blackouts as a result of his crash injuries, he stopped flying, and in 1942 went to Washington, D.C., as a military attaché. He met Martha Gellhorn and Ernest Hemingway and played poker with Senator Harry Truman. He began to write up some of his wartime experiences. He also met Walt Disney, to whom he sold “The Gremlins,” his first children’s story. It was based on an R.A.F. legend of gnomelike creatures with the capacity to sabotage a flight. (No movie version was ever produced.)

Most of Dahl’s early writing was for adults. He specialized in wartime stories and macabre tales with surprise endings, or what the British call “a twist in the tail.” In a typical story, a wife kills her husband with a frozen leg of lamb, then cooks the murder weapon and serves it to police investigators. But by the early sixties some of that success had begun petering out. The New Yorker, which had earlier accepted several stories, now sent rejection notices. Dahl’s adult stories were crisply, shiveringly enjoyable—rather like “Twilight Zone” episodes—but they showed little compassion or psychological penetration. It was children, it seemed, not adults, on whom Dahl could lavish empathy.

In 1953, he married Patricia Neal, who had recently ended a long affair with Gary Cooper, and the following year bought a house in Buckinghamshire, near his mother and sisters. Dahl adored his children, but in his family life he suffered several tragedies. His baby son, Theo, was badly injured when a car hit the carriage his nanny was pushing across a street in Manhattan. He survived but suffered from hydrocephalus. A daughter, Olivia, died from measles at the age of seven. Treglown writes that, shortly after Olivia’s death, Dahl and Neal visited his old headmaster, the retired Archbishop of Canterbury. Dahl wanted to think that Olivia could have the companionship of dogs in the afterlife, because she had loved them so in life. He was furious when the Archbishop told him that the Christian vision of Heaven did not include canines.

In 1965, Neal suffered a stroke while she was pregnant with the couple’s fifth daughter, Lucy. While she recovered, Dahl took over running the household; he even drove the kids to school in the morning. If he was sometimes moody or gruff or turned on people who disappointed him, who can blame him? He was pragmatic and resourceful. Prompted by Theo’s difficulties, he helped devise a valve for draining water on the brain which was used to treat thousands of children. And if he was not physically affectionate with his children—as Tessa Dahl, his eldest daughter, has written—he shared their interest in pranks, knock-knock jokes, and incessant teasing. He also had a gift for creating an aura of magic. Dahl once directed Tessa to look at the grass below her bedroom window. Fairies, he explained, had inscribed her name on the lawn. (He’d done it himself, by sprinkling weed killer.) When the Dahls hosted slumber parties, he’d rouse the children at midnight, take them outside, and tell them stories under a tree.