The Sandman comics creator said he used to view his overactive imagination as his “big weakness” and did not realise that it would become a “superpower”.
Speaking on BBC Radio 4’s Desert Island Discs, he said he had found “comfort” and “friends” in books which made him such a voracious reader.
“I wasn’t very good at friends when I was a kid,” he said.
Books didn’t let you down. Books wouldn’t make fun of you. Books were sensible
“Books didn’t let you down. Books wouldn’t make fun of you. Books were sensible.
“It was only after I had been a father three times that I finally came to the conclusion that actually kids don’t automatically alphabetise their bookshelves, that was just me.”
Recounting being frisked for contraband literature at family gatherings, he continued: “(It was) always my dad
“He would literally pat me down because I had been known to hide books under my jumper and he would lock them in the car.
“It never really worked because wherever we were I could normally find something to read, it just wouldn’t have been what I wanted to read.
Being brave doesn’t mean you’re not scared. Being brave means you’re scared and you go on and do the right thing anyway
“But I’d be at a family gathering and I’d be off in the corner reading The Joys of Yiddish by Leo Rosten or something because it was the book I found.”
Gaiman admitted he found lots of things frightening as a child, which had an impact on his writing.
Asked what he was afraid of he said: “You name it, definitely the dark, shadows, witches, anything that really did exist and anything that didn’t.
“I used to genuinely envy kids that didn’t have imaginations who weren’t populating the shadows with things.
“I couldn’t switch that off and I thought of that as my big weakness and did not realise that one day I would grow up and that would be my superpower.
He added that the darker elements of some of his works, including Coraline, were ways of reassuring his younger self.
“I just wanted to be able to tell myself as a seven-year-old, terrified of the dark, it’s ok to be scared.
“Being brave doesn’t mean you’re not scared.
“Being brave means you’re scared and you go on and do the right thing anyway.”
Desert Island Discs airs on BBC Sounds and BBC Radio 4 on Sundays at 11am.