Speaking to DS, the showrunner explained that he knew how the series would turn out.
"I had aspects of it," he said. "I had certain things I needed to get to, and I had an overarching idea that would, and I suppose it's better to talk about it after next week's episode. There are certain things you'll see that have been there from the beginning. There's been quite a careful planning of things, which is pretty obvious from episode 12, that everything was set up and paid off there. There's more coming next week, in the event that anyone comes out of the Pandorica."
He continued: "You have to leave yourself some space to improvise, otherwise it gets boring, otherwise you get bored with your own script, and quite a lot of episode 13, which is a mad episode, is brand new. But there were certain points where I know I wanted 'this'."
However, Moffat refused to reveal any details about Saturday's finale.
He said: "Well, there's going to be some light music and a short note of apology saying, 'The universe ended last week, we're really sorry, we don't know what you're doing here, didn't you get the message?'"
Doctor Who concludes on Saturday at 6.05pm on BBC One.
> Click here to read our interview with Steven Moffat