Wednesday 1 September 2010 15.30 EDT
First published on Wednesday 1 September 2010 15.30 EDT

When, not very long ago, Terry Pratchett's father was given a year to live, Pratchett père took it, on the whole, philosophically. Father and son had plenty of time to "have those conversations that you have with a dying parent", and to reminisce about his father's time in India during the war. At one point, said Pratchett, in last year's Dimbleby lecture, his father suddenly said, "'I can feel the sun of India on my face,' and his face did light up rather magically, brighter and happier than I had seen it at any time in the previous year. If there had been any justice or even narrative sensibility in the universe, he would have died there and then, shading his eyes from the sun of Karachi."

If the universe refused to display narrative sensibility, then Pratchett Jr would: that moment returns early in his new novel, I Shall Wear Midnight, in which a gruff, essentially kindly old man is vouchsafed a vision of youth and sunlight (though, instead of Karachi, the sunbeams glint off a leaping hare) and expires as he describes it. Even Pratchett knows this is a tad too neat, however, so, this being Discworld, his fantasy kingdom on a flat planet sailing through space on the backs of four elephants who in turn stand on a giant turtle, Death makes a lugubrious wisecrack about it: "WASN'T THAT APPROPRIATE?"

Pratchett, when he arrives at his idyllic local pub in Wiltshire, turns out to be full of this type of humour – deliberate, slightly coercive, very self-aware. He seems a man used to being listened to: his sentences unspool evenly, sometimes a shade irascibly, from beginning to end, often as anecdotes topped and tailed and full of random facts, gloried in for their own sake – annual expenditure on farmers' boots in the 19th century; the ubiquity then of shoe trees; did you know that in Victorian England, most of the women read and most of the men didn't?

Partly, though, this is because he's been writing all morning: I Shall Wear Midnight, a young adult novel, was launched in central London at midnight on Tuesday, but, as has been the way throughout a career that has so far produced 50 novels (38 of them set on Discworld) and generated more than 65m book sales – Pratchett is already 60,000 words into the next book.

And for the last two and a half years, ever since he was diagnosed with posterior cortical atrophy, a rare form of Alzheimer's, and lost the physical ability to write, he has dictated those words into voice-recognition software. At first, in fact, he talks to me about the machine as if I ama machine (which is not entirely unwarranted: there is a tape recorder sitting on the table between us). ". . . And the nice thing is, contrary to what you might initially expect, comma" – we both burst out laughing – "yes, sorry about this, full stop."

Pratchett has announced that his new book will be the last in his Tiffany Aching series (Aching is a young witch), and the novel, a bridge between childhood and the adult world, is full of worldly darkness – death, domestic abuse, old women's corpses being eaten by their pets, depression. "I'm a fantasy writer," he says. "Called a fantasy writer. But there's very little, apart from one or two basic concepts in I Shall Wear Midnight, which are in fact fantasy. You have sticks that fly, but they're practical broomsticks, with a bloody great strap that you can hold on to so you don't fall off. And you try not to use them too often."

Aching is, in effect, a young social worker, and much of her supposedly witchy wisdom comes simply from being near to people in the moments when others are not, or from making mistakes. At one point, in exasperation, she gets her familiars, the Nac Mac Feegles, to whizz around a depressed woman's very messy kitchen and clean it up – succeeding only in terrifying her.

"Tiffany's parents got it right," says Pratchett, sounding for all the world like a promoter of Cameron's Big Society: "mobilise the village to deal with [somebody like that]." Aching has First Sight and Second Thoughts (and occasionally third and fourth) – but they are, respectively, "seeing what's really there, rather than what you want to see," and "thinking about what you are thinking": self-awareness by other names.

Pratchett knows there are strict rules about making things so dark when you are writing for children – "a child's instinctive grasp of narrativium [sic] is that this has got to end well" – but he is also very clear that, while his witch can take away physical pain (she draws it out into a ball, then dumps it), she cannot, and will not, take loss, sadness, or grief.

"I've lost both parents in the last two years, so you pick up on that stuff," says Pratchett. "That's the most terrible thing about being an author – standing there at your mother's funeral, but you don't switch the author off. So your own innermost thoughts are grist for the mill. Who was it said – one of the famous lady novelists – 'unhappy is the family that contains an author'?"

He doesn't say it in so many words, but that must also be combined with grief for the loss of his ability to write longhand, or type with anything other than one finger at a time (although, weirdly, he is still perfectly able to sign his name — "the bit that knows how to sign my name is an entirely different bit of the brain"); the grief of knowing that while he may have years yet, most of his other mental faculties will go the same way. But probably not suddenly.

"Every day must be a tiny, incrementally . . . incremental . . . incremental . . . – he stumbled over a word; you must write that one down," Pratchett says with a dark, almost-laugh. (Having been a journalist himself, before becoming a PR in the nuclear industry and thence a novelist, he rarely passes up a chance to remind you that he knows how journalists work) ". . . incremental . . . change on the day before. So what is normal? Normal was yesterday. If you lose a leg, one day you're hopping around on one leg, so you know the difference.

"The last test I did was the first where I wasn't as good as the previous time. I actually forgot David Cameron. I just blanked on him" – this time the laugh contains, what – a kind of ironic approval? "What happens is, I call it the ball bearing. It's there, it just hasn't gone into the slot." He cannot begin to do tests that require him to scribble shapes, but asked to list names of animals, "I industriously say more than you can possibly imagine" – you can just see the pleasure of the earnest nerd in school – "and we go on for a little while until she smiles and says, 'Yes, we know, we know.'

"And then there was the time with dear Claudia with the Germanic accent – which is always good if someone's interrogating you – and she said, 'What would you do with a hammer? And I said, 'If I had a hammer, I'd hammer in the morning. I'd hammer in the evening, all over this land.' And by the end I was dancing around the room, with her laughing. The laugh will be on the other foot, eventually, and I'm aware of that. But it shows how different things can be: I can still handle the language well, I can play tricks with it and all the other stuff – but I have to think twice when I put my pants on in the morning."

How does it change his sense of self? "Well – no one's policing their own minds more than an author. You spend a lot of time in your own head analysing what you think about things, and a philosophy comes. I think – this is going to follow me for ages – I'm open to moments of joy: the other day, it was just a piece of rusty barbed wire in the hedge. Something had grown over it, and the whole pattern, the different shades of brown, the red – everything made a superb construction. And I was just happy that I'd seen it. But then I think – and it may just be because I'm 62 – it's also made me more . . . cynical? About government. And more sure, which is why I'm doing the Dignity in Dying."

For nearly as long as he has been public about his illness, Pratchett has been public about his wish to choose when he goes, and his puzzlement that British law does not see the sense of his position. "I feel embarrassed that people from this country have to go, cap in hand, to die in Switzerland. Apart from anything else, it makes it a rich man's – or a soon to be much poorer man's – possibility." And people have to go earlier than they intended. "Exactly."

He has a lot of time for the law in Oregon, where doctors can give a terminally ill patient a "potion to take when life gets too bad. I believe something like 40% or more of the patients die without taking it. Which means that every day they're thinking, 'Hmmmm – today's worth living.' And then one day they don't, and they die. That seems to me a very human thing, and a very good thing, because they can think, 'OK, that's sorted, I've got the potion, now I can get on and try and get the most out of life.'"

Ideally, Pratchett would like things to be even more official than that: there should be tribunals – here he leans forward, looking intently at me over his glasses – of mental health professionals, lawyers etc, all over the age of 45, who would question the patient and try to ascertain that no one was coercing them, and that the choice was not "a passing fixation".

But that's incredibly difficult; in illness you're often dealing with depression. "Yes. Yes, I know. I know," he says impatiently. Of course he knows. "Nothing I can say or devise, and nothing anybody else can say or devise, is going to be perfect. But anything is better than some poor half of a couple in some house, devising something with ropes and pulleys, saying, 'If he pulls this and we use that . . .' – that's obscene."

Currently, that half of the couple can, in theory, be prosecuted for murder. At least with a tribunal, "it would mean that whoever is left behind is at somewhat less risk – they're probably still at some risk, but at least there would be some proof that the situation was there."

Part of me wonders if the publicness of Pratchett's discussions might, on some level, be trying to achieve this too – getting us to act as an unwitting tribunal and witnesses, if or when the need arises. What does Lyn, his wife of more than 40 years, think of all this? "I think my wife takes the view that . . . Actually, I think in her heart of hearts she takes the view that a hand will come out of the sky with a big flask, saying, 'Just the stuff you were after.' I think she takes the view that, um . . . that she would look after me. And I have not said to her – I have absolutely not said to her – 'I want you to do this, or I want you to do that.'" What about his daughter (Rhianna, 33, a successful games scriptwriter and, as she describes herself on her website, "general narrative paramedic")? "My daughter thinks, 'If Dad wants it, that's OK.' I don't think she has any particular interest in seeing me lying there like a baby."

That was certainly the way he felt about his own father. It was even, it seems, something his father wanted. Had it been legal, Pratchett says, and "if he could have sat up in bed and said goodbye, I'd have pressed the button. I wouldn't have been able to see for crying, but I would have considered that a duty."

• I Shall Wear Midnight is published by Doubleday at £18.99. To order a copy for £14.99 with free UK p&p go to theguardian.com/bookshop or call 0330 333 6846.

• This article was amended on 2 and 6 September 2010. The original referred to Nac Nac Feegles and First Sight and Second Sight. These have been corrected.