Wells called his political views socialist. He was for a time a member of the socialist Fabian Society, but broke with them as he intended them to be an organization far more radical than they wanted. He later grew staunchly critical of them as having a poor understanding of economics and educational reform.
He ran as a Labour Party candidate for London University in the 1922 and 1923 general elections after the death of his friend W. H. R. Rivers, but at that point his faith in the party was weak or uncertain.
Social class was a theme in Wells's The Time Machine in which the Time Traveller speaks of the future world, with its two races, as having evolved from
"the gradual widening of the present (19th century) merely temporary and social difference between the Capitalist and the Labourer"..
His most consistent political ideal was the World State. He stated in his autobiography that from 1900 onward he considered a World State inevitable. He envisioned the state to be a planned society that would advance science, end nationalism, and allow people to progress by merit rather than birth. In his book In the Fourth Year published in 1918 he suggested how each nation of the world would elect, "upon democratic lines" by proportional representation, an electoral college in the manner of the United States of America, in turn to select its delegate to the proposed League of Nations.This international body he contrasted with imperialism, not only the imperialism of Germany, against which the war was being fought, but also the more benign imperialism of Britain and France.
His values and political thinking came under increasing criticism from the 1920s and afterwards.
Lenin's attempts at reconstructing the shattered Russian economy, as his account of a visit (Russia in the Shadows; 1920) shows, also related towards that.This is because at first he believed Lenin might lead to the kind of planned world he envisioned. Despite being a strongly anti-Marxist socialist who would later state that it would have been better if Karl Marx had never been born.
The leadership of Joseph Stalin led to a change in his view of the Soviet Union even though his initial impression of Stalin himself was mixed. He disliked what he saw as a narrow orthodoxy and obdurance to the facts in Stalin. However he did give him some praise saying in an article in the left-leaning New Statesman magazine, "I have never met a man more fair, candid, and honest" and making it clear that he felt the "sinister" image of Stalin was unfair or simply false. Nevertheless he judged Stalin's rule to be far too rigid, restrictive of independent thought, and blinkered to lead toward the Cosmopolis he hoped for.
Wells believed in the theory of eugenics. In 1904 he discussed a survey paper by Francis Galton, co-founder of eugenics, saying "I believe .. It is in the sterilisation of failure, and not in the selection of successes for breeding, that the possibility of an improvement of the human stock lies." Some contemporary supporters even suggested connections between the "degenerate" man-creatures portrayed in The Time Machine and Wells's eugenic beliefs. For example, the economist Irving Fisher said in a 1912 address to the Eugenics Research Association: "The Nordic race will... vanish or lose its dominance if, in fact, the whole human race does not sink so low as to become the prey, as H. G. Wells images, of some less degenerate animal!"
In the end his contemporary political impact was limited. His efforts regarding the League of Nations became a disappointment as the organisation turned out to be a weak one unable to prevent World War II. The war itself increased the pessimistic side of his nature. In his last book Mind at the End of its Tether (1945) he considered the idea that humanity being replaced by another species might not be a bad idea. He also came to call the era "The age of frustration."
Wells wrote in his book God The Invisible King that his idea of God did not draw upon the traditional religions of the world: "This book sets out as forcibly and exactly as possible the religious belief of the writer. [Which] is a profound belief in a personal and intimate God." Later in the work he aligns himself with a "renascent or modern religion...neither atheist nor Buddhist nor Mohammedan nor Christian...[that] he has found growing up in himself."
Of Christianity he has this to say: "…it is not now true for me. … Every believing Christian is, I am sure, my spiritual brother … but if systemically I called myself a Christian I feel that to most men I should imply too much and so tell a lie." Of other world religions he writes: "All these religions are true for me as Canterbury Cathedral is a true thing and as a Swiss chalet is a true thing. There they are, and they have served a purpose, they have worked. Only they are not true for me to live in them. … They do not work for me."
H G Wells spent his final years venting his frustration at various targets which included a neighbour who erected a large sign to a servicemen's club. As he devoted his final decades toward causes which were largely rejected by contemporaries, his literary reputation declined. One critic said, "Mr. Wells is a born storyteller who has sold his birthright for a pot of message.
Wells was a diabetic and a co-founder in 1934 of what is now Diabetes UK, the leading charity for people living with diabetes in the UK.
He died of unspecified causes on 13 August 1946 at his home at 13 Hanover Terrace, Regent's Park, London. Some reports indicate the cause of death was diabetes or liver cancer.In his preface to the 1941 edition of The War in the Air, Wells had stated that his epitaph should be: "I told you so. You damned fools."but his wish was not granted as he was cremated at Golders Green Crematorium on 16 August 1946 and his ashes were later scattered at sea.[43] A commemorative blue plaque in his honour was installed at his home in Regent's Park.