A 19th-century fairytale by Labour party founder Keir Hardie, which sees a gnarled, good-natured giant called Labour pitted against a king who was “much given to scheming and had a perfect hatred of work”, is to see the light of day for what is believed to be the first time in more than a century.

The History of a Giant: Being a Study in Politics for Very Young Boys, was published in the socialist newspaper Labour Leader on 8 April 1893, but has lain forgotten since. One of dozens of tales in a new collection of socialist children’s stories, Hardie’s story follows the life of Labour as he comes to the realisation that he needs to rid himself of the king and his offspring, Liberal and Tory.

“As they had given him a vote, for his amusement as they thought, he would use that to undo the mischief which the carelessness of generations had brought upon him,” wrote Hardie, who established the Labour party in 1900. “True, his children were very much divided; some being misled by the honeyed promises and fine words of Liberal, and others frightened by the alarms of Tory. Still giant Labour made up his mind that either he must be master in his own household or die in the attempt.”

Hardie “endeth” his story with a “gallant standard … floating proudly in the breeze”, high over the “Tent of Labour … On it are emblazoned in letters of gold the words ‘INDEPENDENT LABOUR PARTY’, and under that flag will be found those who love Humanity more than material greatness.”

The tale sits alongside almost 50 political stories first printed in British workers’ magazines in the late 19th and early 20th centuries, which are being republished in Workers’ Tales, edited by former children’s laureate and Goldsmiths professor of children’s literature Michael Rosen. “The implication behind socialist tales for children and adults was that just as Bible stories were thought to make Christianity comprehensible and appealing, so socialist stories would do for socialism,” Rosen writes in his introduction.

“These stories were published in socialist journals that rose and fell at an alarming rate between 1880 and 1920. They were very short-lived – it was mostly working people who were editing and writing them,” said Rosen. “Very few survived for long – they didn’t really have a political party to sustain them [until] the Labour party came along with its mass membership.”

The collection also features William Morris’s 1884 story An Old Fable Retold, in which a gathering of poultry discusses the best way for them to be eaten (“Moral: Citizens, pray draw it for yourselves,” writes Morris); the 1887 tale A Dream of Queer Fishes, which Rosen described as “a warning tale about deceit over home rule for Ireland”; and The Political Economist and the Flowers, which features two gardeners highlighting “the cold heart of Darwinian competition”.

The collection also includes another tale from Hardie, 1894’s Jack Clearhead. Subtitled “A Fairy Tale for crusaders”, Hardie intended for it “to be read to them by their fathers and mothers”. The story appeared weekly in the Labour Leader and ran to 13 chapters. Rosen described it as a Swiftian allegory, which sets the tribes of the Sharpheads and the Dullards against each other. It also features little Jack Clearhead, a boy who is given a sword by “the good fairy Common Sense”, as well as the cruel giants Mon-o-Poly, and Com-pe-Tition. Jack later rescues the beautiful maiden Social-Ism – “her mother’s name was Truth and her father’s Justice”– who has been held captive by the giants and hounded by the dogs of the Press Curs.

Hardie’s tales have never been republished, according to their new publisher Princeton University Press, which said his socialist fairytales had been overlooked. He did, however, have his fans during his time; Carolyn Sumpter’s book The Victorian Press and the Fairy Tale cites correspondence that shows his tales were “very highly appreciated by the mothers and the fathers”, as well as by children.

According to Rosen, who has also co-edited Oxford University Press’s just-published Reading and Rebellion, an anthology of 20th-century radical writing for children, the tales show signs of being “part of a young movement, confident in the certainty that the endpoint can be achieved”.

Rosen writes in Workers’ Tales: “This is socialism at its most hopeful, perhaps at its most innocent, untouched by world war, Stalinism, or the Holocaust.”

His Dark Materials author Philip Pullman said there “couldn’t be a better time to bring these stories back into print. This is a wonderful and wonder-filled collection, which testifies not only to the breadth of the human imagination but also to the enduring importance of my favourite virtue, hope. We need them more than ever.”