A couple of minutes into Back in Black, there’s a shot of Terry Pratchett’s head, outlined in twinkling lights hovering over his own memorial service at the Barbican Centre in London. It looks like a satellite photograph of some new country. As Auden said of Edward Lear: “He became a land.” And here are its people.

One of the charms of this docudrama is that it largely eschews the usual talking heads in favour of Discworld fans. Even the famous faces that do appear – Neil Gaiman, Pratchett’s consigliere Rob Wilkins, the illustrator Paul Kidby – first entered Pratchett’s orbit as fans. Whether it was the life-changing offer he made to collaborate with the young Gaiman on Good Omens, or the blessing to Stephen Briggs’s attempts to map Ankh-Morpork, or simply Tipp-Exing over an old dedication in a secondhand copy of one of his books so he could “unsign” it for its new owner, Pratchett showered his fans with favours like a Highland clan chief. It’s a clan with its own code of honour: to “be a bit more Terry” is to be kinder, more tolerant.

At first, it feels a little uncomfortable that instead of the man himself, we have the actor Paul Kaye dressed up as him. But then you notice that nearly everyone here is dressed up – as a witch, a member of the Nightwatch or some other character – and of course Pratchett himself was always dressed up as Terry Pratchett, with the iconic hat, big beard and black jackets. You might quibble that showing him mostly in the context of his hardcore fans makes him look more like a cult hero and less what he truly was: a novelist for everyone, for all ages and for the ages. Certainly, Terry did yearn at times to be taken more seriously by the literati. But then after a clip of one of its more gormless members declaring that “no woman would ever read” him, there is a clip of crowds of Pratchett’s female fans dressed up as his brilliant and bracing feminist hero, Granny Weatherwax.

Paul Kaye as Terry Pratchett in Back in Black. Photograph: BBC/Charlie Russell

Why would anyone want to be taken seriously? Great artists have to create the taste by which they are enjoyed. Pratchett is in the same, undying category as GK Chesterton and Jonathan Swift, impossible either to classify or ignore. It’s a great pity that the film didn’t point out that one group of people – librarians – did notice his brilliance and awarded him the Carnegie medal. It’s often forgotten, and was again here, that Pratchett was an important and brilliant children’s writer. Before going on to sell 45m books and help define British culture, Pratchett failed his 11-plus – testimony to how just how good that system was at picking talent. He always made it clear that it was the public library system that saved him. He would have relished the folly of a government that wants to close down those cheap, effective libraries and bring back that costly cockamamie exam.

Val McDermid pointing out that, in Sam Vimes, Pratchett created one of the great detectives is a nice moment of recognition beyond the fantasy fandom, but the greatest and most important of all his characters is surely Death. In a society that avoids discussing the subject, Pratchett made Death – with his horse Binky – his central creation, and his favourite. Seven of his books were written in the terrible interval between his being diagnosed with Alzheimer’s and finally walking away with his most beloved character. In common with so many people now, I have someone with dementia in my family. Watching this, yes, is heartbreaking, but there’s also something revelatory in this documentary – which draws on the autobiographical work Pratchett was writing before he died – watching how he tried to make sense of his situation, by picking and mixing memories and impressions to make some sort of narrative, then dropping and starting it again when it doesn’t make work. To the end, he was restlessly creative. He was sometimes scared, often happy. Back in Black is both heartbreaking and hilarious, and a fitting goodbye from the man himself.

There is an image in what I think is Pratchett’s masterpiece – the Bromeliad Trilogy, one of his children’s series – of a tree frog that has lived inside a bromeliad all its life, believing it to be the whole world. One day he climbs out and sees the entire rainforest canopy, with its constellations of other unexplored bromeliads. It’s an image he kept coming back to. I can think of few thinkers and writers who have explored so eloquently the dialectic between belief and knowledge, between faith and reason. Time and again, in both his adult and children’s books, we find that a ludicrous idea or mad tradition – the Thing that will lead us home – turns out to be true in some surprising way. Pratchett believed in reasonableness and in Reason, in using your brain to its utmost. But he also made room for a streak of optimistic humility, the possibility that the brain might not be the perfect instrument for understanding the universe, that one day you might be able to climb out of your flower and see the whole canopy. And maybe that’s what he did.