So, it’s summer and you’re ready for some escapist reading. But what? Well, you need look no further than Margalit Fox’s enthralling “The Confidence Men: How Two Prisoners of War Engineered the Most Remarkable Escape in History.” As Fox writes in a one-sentence summary, during World War I “two British officers”— Elias Henry Jones and Cedric Waters Hill — “escaped from an isolated Turkish prison camp by means of a Ouija board.”

In essence, the pair convinced both the camp’s general factotum, whom they nicknamed the Pimple, and its Turkish commandant that they were in communication with an otherworldly spirit who knew the location of an immense buried fortune. Having excited the greed of their captors, Jones and Hill next persuaded them that the final clue to the treasure’s whereabouts could only be revealed after the two mediums, along with the Pimple and the commandant, made their way to the busy seacoast near Constantinople. I’ll say no more about their ingenious scheme, except to add that once outside Yozgad, the middle-of-nowhere prison where they were being held, Jones and Hill are forced to adopt a drastic, life-threatening Plan B.

It’s quite a story, which some readers may already be aware of from Jones’s once popular, now half-forgotten 1919 memoir, “The Road to En-Dor.” Neil Gaiman fans doubtless recall that he and the magician Penn Jillette (of Penn and Teller) once collaborated on a script for a film — never made — based on the book. More recently, Mark Valentine included a superb essay on “The Road to En-Dor” in his collection, “A Wild Tumultory Library.”

Fox, however, goes far beyond Jones’s autobiographical account by enlarging its scope. She does this by interweaving two supplementary narrative threads that help explain why this improbable scam actually worked. First, at appropriate intervals, she reminds us of the era’s scientific and pseudoscientific beliefs, especially the vogue for spiritualism, telepathy and Ouija boards. Second, she links Jones and Hill’s ultimate success to their mastery of the deceptive skills and subtle mind games practiced by stage magicians, con artists and lawyers (Jones was a trained barrister).

More generally, Fox writes in a brief introduction, her book also aims to answer, if only partially, such questions as “How does a master manipulator create and sustain faith? Why do his converts persist in believing things that are patently false?” She adds that a willing obedience to authority often characterizes those in thrall to present-day “advertisers, cult leaders, and political demagogues,” many of whom exercise what “The Shadow” radio dramas used to call “the power to cloud men’s minds.” In case you wondered, by “demagogues” Fox was clearly thinking of one in particular: An endnote lists two scholarly studies of Donald Trump.

Usually, when reading anything I use the book’s margins and endpapers to scribble thoughts, questions and criticisms. Not this time. Fox never gave me a chance because she never loosened her grip on my attention. Start “The Confidence Men” and you too will turn page after page, eager to find out what happens next. While Fox’s earlier “Conan Doyle for the Defense”— an account of how the creator of Sherlock Holmes worked to free a man wrongly convicted of murder — struck me as slightly over-orchestrated, this time she’s found just the right tone, balance and rhythm. A biographical note in the book even calls Fox “one of the foremost explanatory writers and literary stylists in American journalism.” Without attribution, that does sound just a tad boastful, but it may well be true.

Deep down, writing isn’t all that different from the confidence game: It’s the art of using words to manipulate people’s thinking and emotions. For instance, through these squiggles on the page, I’m aiming to create certain impressions in your mind. By this point, you should be imagining me as genial and easygoing, a fellow reader rather than a pontificating critic, someone who clearly knows a lot about books but also a guy who doesn’t make a big deal of it. To induce this perception, every artless-seeming sentence here has been calculated, re-examined and endlessly tweaked. For example, the mention of Neil Gaiman hides an effort to gain media cred, however minuscule, with younger readers. Even this apparent digression with its minorly clever point — that writing is a kind of con game — serves as a breathing space, a slight pause before the rush of my final two paragraphs. A professional writer’s prose is never guileless or innocent.

Fox herself knows this. “Every con,” she writes, “starts with a good story” and the one she tells in “The Confidence Men” is exceptionally entertaining. Nothing goes on too long. The overall narrative gains richness, strength and a kind of polyphony by mixing Fox’s crisp exposition with quotations from Jones’s memoir and the reminiscences of other prisoners. Having been the senior obituary writer for the New York Times, Fox long ago learned the reader-appealing usefulness of the melodramatic sentence and weird anecdote. At one point, Jones and Hill’s increasingly tricky escape plan requires that they “have themselves tried, convicted and . . . sentenced to solitary confinement for transmitting war news by telepathy.” She later adds, in a mischievous understatement, “All that remained now was for Jones and Hill to go insane.” This last extraordinary stratagem leads to months in which Jones, maniacally insisting that he has become a Turk, scribbles anti-British treatises, while an almost robotic Hill spends all his time fasting and reading the Bible.

Let me end by repeating that “The Confidence Men” is exceptionally entertaining, but point out that Fox does open up a troubling vista: We are all vulnerable to psychological manipulation. More than ever, with no sure footing in our rabidly media-dominated world, the only sensible course left us is to tread very, very carefully.

Michael Dirda reviews books for Style every Thursday.

CONFIDENCE MEN: How Two Prisoners of War Engineered the Most Remarkable Escape in History

By Margalit Fox

Random House. 352 pp. $28