A portrait of Steven Moffat with the words 'Shelf Life' next to it

Steven Moffat on the five books that changed his life

The award-winning writer behind Doctor Who, Sherlock and The Time Traveler’s Wife on the reads that continue to inspire him

As told to Kezia Newson

Books were my first experience of stories, and reading was absolutely everything to me when I was a child. When you’re young, your territory is not your own. You’re shoved around where people want you, so reading a book was a way of disappearing, or being in your own world. I loved anything with fantasy or time travel in it; those were always my favourites, obviously.

Tom’s Midnight Garden (1958) is one of the very few books that has absolutely stayed with me right into my adult years, and I read it again not that long ago. It holds the magic of childhood married with the feeling of complete boredom – “I’m really bored sitting here, but through that door, there is something incredibly exciting.” In a way the story is more coherent than just the Narnia element of the garden because Tom goes back in time, and it all loops into him wandering within someone else’s dreams. I also can't get through the last chapter without crying, when he's reunited improbably but wonderfully with Hatty. It's a perfect example of a non-romantic love story, which we don't do very much.

I think that book imprinted a generation. It imprinted me very much, very obviously. It's the first clever use of time travel I'd ever seen, way before I watched Doctor Who. There’s a part where Tom asks Hatty to leave some ice skates in a room for him, nearly a hundred years before. I think that is genuinely the first time my little brain thought, "Ooh, wow, you can do that!” I've done Tom's Midnight Garden several times in different ways. Maybe there's a whole bunch of us out there imprinted by Philippa Pearce.

One night when I was a child, I was sent to bed early because Hound of the Baskervilles was on, and it was too scary for me. But I knew enough to know that it was about a detective fighting a ghost dog, and I thought: "I need to know about a detective that fights ghost dogs. I mean, that's me! And he's got a funny hat, come on. I need to know about Sherlock Holmes." And it just wasn't that easy back in the day when you had to get a bus to the library or find published versions in shops.

'It'd be a total lie if I didn't include Sherlock Holmes in my list'

Then one weekend I was sent to stay with my grandparents, which I was slightly grumpy about. And after my parents left, I went up to the bedroom and there lying on my bed left by my father was A Study in Scarlet, the first Sherlock Holmes story. That's when I first read it, and I devoured the rest, I think in order, which nobody does.

In this case, my choice of The Return of Sherlock Holmes (1905) is standing proxy for all [of the Sherlock tales], but I have a reason for particularly choosing it. The first two novels are written when Arthur Conan Doyle is still making his way. He has this huge hit with Sherlock Holmes and then turns it off as fast as possible to be a serious novelist! Several years later, he brings Sherlock Holmes back to life in The Return of Sherlock Holmes, and this is the first time that he is a superstar writer writing a superstar character. Sherlock Holmes isn't a thing he came up with recently; it's a monolith, and he knows it’s his. And for all his professed grumpiness with the character, the love of that success and the brilliance of those two central characters is never clearer in my view than in The Return of Sherlock Holmes. It just feels like he's having more fun. It'd be a total lie if I didn't include Sherlock Holmes in my list.

Full disclosure, I watched my third choice, The Princess Bride (1973) as a film first, which is written by William Goldman as well as the book. I fell in love with the film (I'm still in love with the film), and read the book as soon as I knew it existed.

It takes somebody of extraordinary talent to simultaneously parody a genre and involve the reader in it. And I think possibly the key to that is that William Goldman loved every single thing about that genre, about those fairy tales, about those grotesque and improbable twists, those tremendous dangers and the slightly loose collection of logic that gets you there. So much as he's laughing at it, he's also in love with it. It's witty and clever, and William Goldman is a peerless storyteller. Absolutely peerless, and a hero of mine.

There are several reasons why I found Next Season (2000)interesting. I'm best friends with many actors; I’ve always asked Mark [Gatiss], what it’s like being in a play and doing it every night and rehearsing? And he's always slightly vague on the subject, as if it's too familiar to him to explain.

This book tells that story beautifully. The behind-the-scenes trauma of what it's like to go to a different place, meet a new bunch of people, decide who you're going to fancy and who you're going to loathe, who's going to be your best mate, where the best pub is and where your favourite toilet in the building is. All those things that people do when they go to work is just beautifully detailed and set out in this. I strongly recommend it. There's also a hidden sort of secret in it, which is that it’s written by a brilliant theatre director called Michael Blakemore. Although this is the worst thing for a writer – he's a director who also writes beautifully!

Love means loss. You're going to lose. I mean, you are setting sail into this in the knowledge you don't both get out alive, right?

With The Time Traveler’s Wife (2003)I was obviously drawn in by the fact it said ‘time travel’ on the cover, but it's not really a time travel book at all. I think it becomes a book about how a happy marriage works – about the details and truths of that frequent, but rarely discussed phenomenon, the happy marriage. There are loads of happy marriages, but they're not very interesting in stories. It's good to get to the altar or to divorce, but what about that bit where two people are happy for decades? Isn't that worth writing about? It's a tough one to write about, because it's contentment, but contentment with a whole other human being for decades is kind of miraculous.

The time travel is used to illuminate the inextricable link between love and loss. Love means loss. You're going to lose. I mean, you are setting sail into this in the knowledge you don't both get out alive, right? That's what it means, "till death do us part". By reminding you of the necessary underpinning of tragedy that every gorgeous love story has, it becomes dramatic again, it becomes interesting again.

At their best, I think book adaptions work as alternative versions of each other. I think when it really works, it's not about the detail, it's about being true to the spirit. And that might mean having to take a different route to get there. When it's well done, the adapter is telling you what they love about the original. And maybe it won't be why you love it, but in a way, what would be the point in it being precisely the same thing?

I could only do an adaptation of something I absolutely love, because only then would I have the confidence to say that I know what's great about this, and I'd like to put that on screen.

What did you think of this article? Email editor@penguinrandomhouse.co.uk and let us know.

Photo above courtesy of Sky
Design: Vicky Ibbetson / Penguin

Sign up to the Penguin Newsletter

For the latest books, recommendations, author interviews and more