HG Wells wrote several classic, visionary novels about the very worst consequences a past and a present can have on a future, and a great deal of what he wrote, though it takes fantasy form, has come to pass, with stunning corollaries with his own time, the time after him, with our own time, and presumably with the as-yet-unwritten time ahead of us too.

So, what did the socialist visionary choose to do, at the latter end of his life, when he was in his 70s – the man who had seen and foreseen so much, in his fiction and his political writing, including (and this is just scraping the surface of his foreseeing) tanks, global warming, aerial flight and bombardment, visible mass surveillance, invisible mass surveillance, modern germ warfare, radio, TV, video, the world wide web, the atom bomb, fallout and radioactive waste, laser beams, cosmetic surgery, chemical weaponry? What did the far-seeing man do, whose literary rise and circulation in the world had made him exceptionally powerful and exceptionally thoughtful about the workings of power, the man who had been invited to meet and advise both Roosevelt and Stalin, who had worked on ways, in his latter years, to “release a new form of power in the world”, a power “without tyranny”, one “to hold men’s minds together in something like a common interpret-ation of reality” and a real “unification of our race” and to work for “our collective life”? What could such a profoundly prophetic writer do, who not only knew but drew for us the thin line between fantasy and reality, possibility and impossibility, and who so convincingly, prophetically and repeatedly envisioned the worst possible things that the world, the universe and the human beings in it can do to each other?

He wrote and published, in 1940, a book called The Rights of Man “using ‘man’, of course,” as he said, “to cover every individual male or female, child or adult, of the species”. He helped form and sustain PEN, where an internationality of writers would come together and think the world, and fight for and protect each other’s freedom to write and freedom to read. He helped form and sustain the National Council for Civil Liberties, now known as Liberty, to monitor and fight for the freedoms that human beings need, and that weak or bullying governments who want all the power will always want to mess with.

Above all, Wells believed that what we needed to do was make and ratify as law an international declaration of human rights. In his final years of life, he was a core contributor to the Sankey Declaration of the Rights of Man; in fact, he was the most active member of its committee, the main drafter of its clauses of fundamental human rights. Wells’s drafts were closely followed in the eventual drawing up of the wording for the 1948 UN Declaration of Human Rights, shortly after his death in 1946. The UK’s own Human Rights Act finally passed into law in 1998, incorporating into British law for the first time the European Convention on Human Rights, protecting human rights across Europe and ratified by 47 member states (the UK was one of the first countries to ratify it in 1951, supported, especially by Churchill, as a protection against the possible return of fascism). The current UK government announced as soon as it took office that it fully intends to “scrap” the Human Rights Act – this is the verb they always use (though personally I find it an obscenity, the words “scrap” and “human” and “rights” together in any sentence.)

Since 1896, when he was a young man writing The Island of Doctor Moreau, a book about the beast in the human, he had been interested in how at the mercy of the random or self-serving lawmakers we are. In the first year of the second world war, remembering how little the League of Nations had been able to “banish armed conflict from the world”, he published The Rights of Man as a call for “a profound reconstruction of the methods of human living”. His question, in 1940 – in fact, his book’s sub-heading – was: what are we fighting for? His answer: “a declaration of rights for the common welfare … a code of fundamental human rights which shall be made easily accessible to everyone”.

His initial draft included most of the things you can still find in our current Human Rights Act, and is especially, and presciently, strong on rights to privacy and dismissal of secrecy. “All registration and records about citizens shall be open to their personal and private inspection. There shall be no secret dossiers in any administrative department.”

Wells was wise enough to call for a visible form of support after a lifetime of seeing the dark of the future

The other suggested rights were: right to nourishment, housing, healthcare and mental care; right to education; right to have home and private property protected; right to work and earn and be free from slavery; right to move freely about the world; right to public trial and to detention for a short fixed time only; freedom from torture and degrading or inhuman treatment; right not to be force-fed nor stopped from hunger strike if you so choose; and right to finite imprisonment terms.

He spends the book tinkering with the precise wordings of these suggested rights, to get it right, because on the one hand, “in its thickets”, as he puts it, “governmental activities can interweave with, and at last become indistinguishable from organised crime”. On the other hand, “the primary objective of every sane social order is to banish fear … from human life”.

Here’s Wells, writing 75 years ago:

The enormous change in human conditions to which nearly all our present stresses are due, the abolition of distance and the stupendous increase in power, have flung together the population of the world so that a new way of living has become imperative … The elaboration of methods and material has necessitated a vast development and refinement of espionage, and in addition the increasing difficulty of understanding what the warfare is really about has produced new submersive and demoralising activities of rumour-spreading, propaganda and the like, that complicate and lose contact at last with any rational objective … The uprooting of millions of people who are driven into exile among strangers, who are forced to seek new homes, produces a peculiar exacerbation of the mental strain. Never have there been such crowds of migrating dep-ressing people. They talk languages we do not understand … they stimulate xenophobia without intention … Their necessary discordance with the new populations they invade releases and intensifies the natural distrust and hostility of man for man – which it is the aim of all moral and social training to eliminate … For the restoration and modernisation of human civilisation, this exaggerated outlawing of the fellow citizen who we see fit to suspect as a traitor or revolutionary and also of the stranger within our gates, has to be restrained and brought back within the scheme of human rights.

A protest outside No 10 last week against perceived human rights abuses by Indian PM Narendra Modi, who was visiting the UK. Photograph: Hugh Cunningham/Demotix/Corbis

Given how familiar all this sounds, it is interesting that our own Human Rights Act is right now coming under attack. The government keeps calling it Labour’s Human Rights Act. It’s not: it was a cross-party formation, and it is ours and belongs to all of us. They want to replace it with a British bill of rights – as if all nationalities are equal, but some are more equal than others. Wells would have dismissed the argument for a British bill of rights, in the interest of “the claims of the common man”, claims “against any government that seeks to defeat, exploit or betray” those common claims.

Back in 1940 Wells was facing his own “incalculable government”, and wanted one that would “declare for these rights unequivocally – or get out”. To paraphrase him slightly: an act of gross cruelty or injustice that occurs anywhere, wherever it happens, is just as much a British person’s concern, a Scottish person’s concern, an English person’s, an Irish person’s, a Welsh person’s, a (fill in the blank with a nationality of your choice) person’s concern. He knew that, as José Saramago puts it in his great novel Seeing: “rights aren’t abstractions, they continue to exist even when they’re not respected”.

“There is no source of law,” Wells says, “but the whole people, and since life flows on constantly to new citizens, no generation of the people can in whole or in part surrender or delegate the legislative power inherent in mankind.”

Jorge Luis Borges thought Wells’s books, especially the early fantastic classics, would last for ever, “be incorporated, like the fables … into the general memory of the species and even transcend … the extinction of the language in which they were written”. Wells himself, knowing the future as he did, was a bit more urgent and immediate about it:

“The only true measure of success is the ratio between what we might have done and what we might have been on the one hand, and the thing we have made and the things we have made of ourselves on the other.”

• This is an extract from the second annual PEN HG Wells lecture given by Ali Smith at the 2015 Edinburgh international book festival. HG Wells’s The Rights of Man has been reissued by Penguin.