Interview: Steven Moffat, Doctor Who screenwriter

The Scot entrusted with the dreams of the nation's youth, the one who must inspire and thrill, is recalling the last time he held a position of similar responsibility.

• Steven Moffat

"I was a phenomenally lazy schoolteacher," says Steven Moffat. "I'd like to think I was funny, I'm pretty sure I was quite popular – but I was lax at marking exams and often I'd just give the kids a book to read so I could doze at my desk."

Well, there's no opportunity for skiving now. Moffat is the new storyrunner on Doctor Who. That's a fancy television term for having the best job in all telly. Think about it: he's in charge of monsters, morals, explosions, choosing the glamorous assistants, a thumping budget and the care and maintenance of what he calls "the greatest fictional character TV has ever created".

Moffat, 48, will try and tell us that Matt Smith, the new Time Lord, has the best job – "I only pretend to be the Doctor in my study; he gets to do it in front of millions" – but this is idle flattery and, indeed, nonsense. Smith must surely know he's subordinate, given what Moffat has said of him recently: how he's nutty, barmy, mental, clumsy, even dredging up the memory of Magnus Pyke.

Oh, and Moffat reckons all of the above make Smith hugely endearing; that he's brilliant at physical comedy, probably the most athletic doctor there's ever been (he was a promising young footballer with Nottingham Forest), definitely the most boffin-like; and that these attributes allied to his "big, mad face" will make us, if not quite forget about David Tennant, then at least not miss him too much.

Instinctively, Moffat thought the first Doctor of his reign and 11th overall might have been older than Smith, who's 27, but he insists that if viewers had been allowed to see the auditions – "Something that may happen in the future although not on my watch" – they'd have voted for him, too. He's also excited about Inverness-born Karen Gillan as Smith's assistant: "She can be incredibly feisty and sexy one minute and look like a 12-year-old the next. Matt has grabbed most of the attention, understandably, but Karen is our secret weapon."

It's a new era for the good Doctor. Smith is picking up the baton – the sonic screwdriver – from Tennant. "First day on set, he broke it," laughs Moffat. And Russell T Davies, who ended Doctor Who's 15-year deep-space sabbatical, transformed him from a geek idol into a hero for us all and, arguably, saved Saturday nights and the institution of the family as a result, is stepping down as impresario of all things Tardis-related and the show's star writer. To replace him, the BBC have promoted from within, the 48-year-old Moffat already being a valued spinner of dark tales within Team Who; indeed many would argue his stories have always been the darkest – and the best.

Today Moffat is in his publicist's office in Soho. He's tall and burly and looking uncomfortable perching on a trendy sofa in an overheated room. An assistant turns down the temperature then stays behind, presumably in case Moffat lets slip juicy detail he shouldn't from the Doctor's big Easter reincarnation. Pleasingly, this does not inhibit him from saying things like: "Television is a great place to pick up women. Pissed television is a phenomenal place."

So, a big responsibility, even for one who's been part of the show since its revival five years ago. Is he nervous? "Well, there have been lots of panicky moments. Doctor Who is an incredibly difficult programme to make. Since the first day of filming, when the tide came in early and chased us off the beach, we've been in a state of crisis. Now, a television crisis isn't a real crisis but it's still enough to stop you thinking about these weird, metaphysical things, like the show's importance in terms of so-called 3GTV (three-generation television, appealing to children, parents and grandparents] or how it's down to me and Simon Cowell to keep the fabric of society together." He pauses. "Mind you, there are times when I don't actually believe the show is coming on television so I may be in a state of some denial … "

I ask about the succession and Moffat laughs. "Oh I see, you think I'm the Gordon Brown figure here? The surly Scot who finally gets his chance to rule only for everything to turn to shit and then has no option but to cry in front of Piers Morgan? What a lovely scenario you've painted for me! Well, there wasn't a Granita (the restaurant setting for the supposed power pact between Brown and Tony Blair]. I was boarding a plane when it happened: Russell sent me an e-mail as I was about to fly to Athens for a meeting about the incredibly short-lived Greek version of my comedy Coupling. I found out subsequently that heavy hints had been dropped twice before about me taking over the show, but I'd been too slow and too hungover to pick up on them."

Moffat admits he'd been envious of Davies when the latter got given the top post, so maybe there's something in the Brown comparison after all. He stresses that after overcoming the disappointment he was perfectly happy contributing regular, and scary, episodes, then watching the rest of the show as a fan. But his stories quickly brought him a discerning following, a clutch of awards (Baftas and Hugos) and the nickname The Moff. If you liked your monsters to be vicious statues, clockwork or stone, the Moff was your man, as he was for The Empty Child and the terrifying refrain: "Are you my mummy?"

Fans have welcomed his promotion, so what kind of storyrunner will he be? "Everyone wants to know about my vision but I only have vague answers," he says. "Maybe this isn't new but it is my view: Doctor Who is a fairy tale – not sci-fi, not fantasy but properly a fairy tale. And I don't mean Disney-style where the endings are changed and everyone lives. Doctor Who is how we warn our children that there are people in the world who want to eat them."

Moffat and Davies are different animals so Doctor Who should change. The latter is Welsh and gay; Paisley-born Moffat drew on his romantic failings as a heterosexual man for telly romcoms such as Coupling and Joking Apart. These things are worth mentioning because some thought that under Davies, Doctor Who had become "too childish, too camp and too gay" – this criticism turning up in, of all places, the Guardian and sparking a heated online debate.

Not surprisingly, Moffat refutes it. "I don't think you can say that Russell has gayed up Doctor Who; you don't encounter any more gay characters in the show than you do in real life. And anyway, it's me who's been responsible for episodes where it's been love in long sentences and frocks, the campest things, and I also think I wrote the gayest Doctor Who joke ever, about The Master's 'rubbish beard'. Russell, on the other hand, had gorgeous women turning up in his stories all the ruddy time. He got Billie Piper into a maid's outfit; the man has no shame and is a proper television tart. But he knew who was watching and, believe me, I'll have scantily-dressed blokes in every episode if they'll bring me big audiences."

So who is The Moff? He's a telly man, for sure, and always preferred it to film. Such is his sworn belief in the goggle-box that he let down Steven Spielberg by quitting the big-screen Tintin for Doctor Who. But, struggling to summon up a childhood horror which might explain the darkness in his writing he claims – a little too cutely – that any short-trousered nightmares would have been provoked by his devotion to the Time Lord.

Though he doesn't seem old enough, he insists he remembers back to William Hartnell, was disturbed by the sudden changeover to Patrick Troughton, dived behind the sofa at the first glimpse of the Cybermen, resumed watching when Jon Pertwee took control of the Tardis, only to wet himself again at some psychotic showroom dummies, and – cuter still – remained loyal right through the grim Sylvester McCoy years.

The son of teachers, he fell into the profession, or rather was pushed. "I was kicked into it," he says. "I don't think they liked the idea of me not working, or still living with them." He taught English but dreamed of becoming a scriptwriter. Then TV lights were turned on Thorn Primary in Johnstone, Renfrewshire, where Moffat's father Bill was headmaster, and his life changed for ever.

He explains: "Harry Secombe filmed an edition of Highway there and Dad told the producers about his great idea: a show based round a school newspaper. Later, when they asked if they could nick it, he said yes on one condition: that they read a sample script by his son. They agreed, but told him there was no chance it could be used as it wouldn't be good enough." It was, though, and Press Gang won Moffat his first Bafta, which may have softened the blow of his first wife running off with another man.

He gave a Press Gang character his wife's lover's name and made him the victim of painful mishaps. He'd learned the lover was a fan of the show, prompting a memorable response from Moffat – "Well, did he have to f*** my wife? Most people just write in!" – which he saved for Joking Apart, an entire series about a cheated-on writer.

Moffat's Chalk was set in a crummy school while Coupling, produced by his second wife, Sue Vertue, had a lot of fun at the expense of male procrastination and wimpishness over cohabitation and commitment. Variously, then, he's had some key moments re-enacted by Dexter Fletcher, Robert Bathurst and Jack Davenport, although he insists: "They form a ridiculous version of my life. The first time, I probably married too young. By the time I met Sue I'd got older, less irritating, stopped being so bloody opinionated and become more honest. Really, I was terrible.

"Between the marriages, I shagged my way round television studios like a mechanical digger. Sue and I got together at the Edinburgh TV Festival and she likes to tell the story of how I was en route to another date the night we met. Conveniently she's blanked from her memory the fact that she did the same. She was just as dreadful as me."

Moffat, who claims not to have ever had fears but who today has ended up alluding to quite a few, says it's difficult for him to identify his writerly preoccupations and that this is best done to others. "Russell reckons it's all about parenthood with me," he smiles. "It's his view that every writer has one story that they go on re-telling and that being a father is mine.

"I had no ambition to become one. I had no feelings about my son when he was about to be born; I just thought my wife was fat. Instantly, of course, I was in love with him – same with my second son when he arrived. Though I do think it's wrong that men have to watch babies, you know, climb out. What are we going to be except absolutely bloody useless?"

Moffat survived the ordeals, which of course were a million times worse for his wife, and Joshua, ten, and eight-year-old Louis seem to be coping with all the terrors that Doctor Who can muster a whole lot better than their father ever did.

"They treat the show as a family heirloom. When I've been worried about episodes being too scary they go: 'No no, Dad, these are cool monsters.' During his last birthday party, Louis led a detachment upstairs to my study. 'We've come to watch you write Doctor Who,' they announced. But he's still only the second-luckiest boy in the universe. Straight after the scripts are finished, Joshua is always first to read them."

Doctor Who returns to BBC1 on Saturday 3 April.

• This article was first published in The Scotsman Magazine on Saturday, March 20, 2010