I write—though perhaps it sounds pretentious to say so—to make a clearing in the wilderness, to find out what I care about and what exactly to make of it. Every day so many experiences, feelings, incidents, encounters crash in on us, and every morning I retire to my desk to make a kind of sense of them, to put them into a larger frame, to find out what my priorities should be. It’s like sifting through the shells you’ve collected after a walk along the beach, and it makes for a stillness that lends peace and direction to the day that follows.

In my most recent book, The Man Within My Head, I was trying to sort through a haunting that I feel, akin to the one that many of us know. Nearly everyone, I think, has some figure in her head—it could be a writer, a singer, an actor, a character from fiction or history—who somehow seems to know us better and more intimately than our own friends and family do. But why (in my case) Graham Greene, and not Aldous Huxley (who went to the same school as I did, and traveled across the Far East when young, as I did, and saw his house in California burn down, as I did)? Why Graham Greene, and not the more dashing fantasy figure of James Bond, say? Why Graham Greene and not the writers I’ve long taken to be inspirations and talismans, Emerson and Thoreau?

I could offer a long list of all the things that Greene and I have in common—from the little neighborhood in Oxford where I grew up (around the corner from his former home) to the places around the world that we’ve both haunted (Saigon, Havana, Port-au-Prince, Asuncion). But I wouldn’t believe the explanations myself. The power of affinity lies in its mystery, the way it stands outside everything logical; you step into a crowded room and see a stranger and somehow you feel you know her better than you know the friends you came with.

For Greene, I’ve always thought, writing was a form of confession, and half-believing prayer, and a way of steadying himself in an uncertain world; it was also his way of trying to balance kindness and discernment. But it was also—more intriguingly—a form of dreaming: as a teenager, he’d spent six months staying with a Jungian dream analyst instead of going to school, and ever after he was fascinated with the way that the subconscious (in dreams or in prose) could intuit the future as much as the past. He’d dream of seeing a ship go down in the Irish Sea, and wake up to learn that a ship had gone down in the Irish Sea, while he was dreaming. He’d write about a dead woman found in a British railway station and, four months later, a real woman was found, dead, in a British railway station.

Every writer who ventures into her subconscious knows this sensation; I wrote a book describing the separation of a couple that seemed close in life and, as soon as the advance galleys arrived on my desk, the couple separated. I couldn’t follow the events of September 11, because I was proofreading a novel I’d just completed—on Islam and its quarrel with the West—that I’d promised, six months earlier, to deliver to my editor on September 12, 2001.

Writing reminds you of how much there is in your life that stands outside your explanations. In that way, it’s almost a journey into faith and doubt at once. “The last function of reason is to recognize that there is an infinity of things that surpasses it,” wrote Pascal. He also wrote—and here I could substitute “writing” for “faith”—“In faith there is enough light for those who want to believe and enough shadow for those who don’t.”

Pico Iyer is the author of two novels and eight works of nonfiction. His most recent book, The Man Within My Head, is just out from Alfred A. Knopf.