I did not steal the book. I did something worse. I found the book in the old school library. The library was next door to the office in which the school's matron (fat and funny and nice), her deputy (sharp-faced and suspicious) and a variety of young helpers (sympathetic teenagers with red cheeks) would read magazines and drink tea. It took a certain amount of bravery to tell them I had a headache. They would give me a cynical look, then dissolve an aspirin in a glass of water, and after I had drunk it I would be sent to sit in the library until my headache went away.

Sometimes I really did have a headache.

The book had a red cover, and it was called The Road to En-Dor. It had a sheet that folded out attached to the back cover with glue: a sort of chart, showing objects and numbers and such, and common phrases. I did not understand what the sheet was, and so I read the book.

The Road to En-Dor is an autobiographical account of life in, and escape from, a Turkish prisoner-of-war camp, Yozgad, in 1917. It was written by EH Jones, and explains how his use of a Ouija board to entertain his friends became, with the assistance of Australian officer (and amateur magician) Cedric Hill, an escape attempt, using the cupidity of their captors. Jones and Hill convinced the Turks (and many of the British officers) that they were mediums in telepathic communication, and, under the direction of a spirit guide, would be able to find hidden gold. Their escape attempt ended in their imprisonment in a Turkish insane asylum, and in repatriation shortly before the end of the war. I was 10 years old when I read The Road to En-Dor and was utterly fascinated.

Reading the book, I was in Yozgad with Jones as he learned to fake the Ouija board, with Jones and Hill as they began to fool the Commandant. I followed them on a journey into nightmares, as what seemed to be a simple escape plan (simple? A lunatic escape plan of infinite complexity and unlikelihood, more like) transmuted and transformed, forever being thwarted by their own side. It was a journey into madness and self-delusion, in which a terrifying folie à deux somehow kept them both sane. It was a strange thing for a 10-year-old boy to be reading.

Somewhere along the way I understood what the chart in the book was: a mind-reading code. Two people could learn it and communicate information with a simple phrase such as "Quick now, what am I looking at?" I had heard of such things – my mother's aunt and uncle had a mind-reading act – but now I was looking at a way to do it.

I removed the chart from the back of the book and took it home, certain that I would one day meet someone who would be the Hill to my Jones, and we would create an astonishing mind-reading act together, but I never did.

I did not forget the book. The book was unforgettable.

Thirty years later, magician Penn Jillette told me in an email that there had never been a fake medium who had ever had a noble or good reason for doing what they did, in hoodwinking the easily hoodwinked, and I agreed with him. Up to a point, anyway. "Except for The Road to En-Dor," I said.

Being Penn, he had found a second-hand copy of the book on the internet within minutes of receiving my email. Also being Penn, he read the book and emailed me within the week, and told me he thought it would make a good film, and that we should write it together.

I reread it. I was surprised at how much I had remembered of the book, and amazed at how much better, deeper and, eventually, darker it was than I had remembered.

We set out on a quest to find who owned the film rights, which led us to Hilary Bevan Jones (granddaughter of EH Jones), who has, in the decade since, become one of my best friends. We even wrote the film script. We learned how much Lieutenant Jones underplayed the horrors that he and Hill went through. We learned of the other film people who had wanted to bring the story to the world. We learned how much love there is for this apparently forgotten book.

I wonder sometimes where the mind-reading chart that I stole from the book is today: somewhere in the attic, at a guess, or in some random papers. I would never have thrown it out. It was the key to the mysteries.

I am so glad that a new edition of the book is now available. It is a true story, underplayed, a story of heroism, of magic and of madness. And you can wonder, as I wonder now, as I wondered when I was 10, whether what Hill and Jones went through was worth it – whether their madness actually kept them sane.