Writer was anti-war but new discovery shows he was drafted by military intelligence service MI7b, shut down in 1918

AA Milne famously denounced war in his pacifist essay Peace with Honour, but classified documents found in an old trunk reveal the author of Winnie the Pooh was recruited by a secret propaganda unit during the first world war.

Jeremy Arter was sorting through old paperwork in his aunt's home when he stumbled across rare, classified documents from MI7b, a military propaganda outfit that worked with writers to present a positive version of the war to those at home.

It closed in 1918 with all official paperwork thought to have been destroyed, but Arter found more than 150 articles saved by his great uncle, Captain James Price Lloyd, who worked for the unit.

"As far as we're aware this is the only surviving body of material from MI7b and it's a truly remarkable record of how the British propaganda machine worked at the time," said Rob Phillips, digitisation project manager at the National Library of Wales, which is creating an archive relating to the Welsh experience of the war.

Along with manuscripts and photographs, Arter found a pamphlet entitled The Green Book, dated January 1919 and stamped MI7b: "for private circulation".

"I looked for Uncle Jim, but I found AA Milne as well. I also found Cecil Street, the author of the Dr Priestley novels; the frontiersman and author Roger Pocock; the Irish poet Patrick MacGill; and JP Morton of Bystander fame," said Arter. "It was a bit like the Magnificent Seven had ridden into town, except that these were more than 20 or so of the greatest literary men of their day all working for MI7b, along with Uncle Jim.

"[The Green Book] was a valedictory in-house magazine probably printed in no more than 20 copies, for each of the people who probably had a farewell dinner at one of the London clubs. In it they vent their spleen and humour at the war and at each other … It's a priceless document. Great Uncle Jim broke every rule in the book [to preserve it]."

In a series of poems, Milne, who also worked as a signalling officer during the first world war and served briefly in France, imagines how "some earlier propagandists" might have approached having to "lie" about the "atrocities" of the war.

In Captain William Shakespeare, of a Cyclist Battalion, Milne writes: "In MI7B, / Who loves to lie with me / About atrocities / And Hun Corpse Factories. / Come hither, come hither, come hither, / Here shall he see / No enemy, / But sit all day and blether."

In Captain Thomas Campbell, of the Border Regiment he writes: "It was the schooner 'Hesperus' / Which sailed the wintry seas … / And victory must remain with us / While we have ships like these."

Milne "probably stood out because he didn't keep his pacifist views to himself", said Arter. The author was discharged in 1919. Five years later he began his career as a children's author, with the publication of two poetry collections, When We Were Very Young and Now We Are Six, and his two Winnie- the- Pooh novels.

His pacifist work Peace with Honour: an Enquiry Into the War Convention was released in 1934. He wrote it, he said, "because I want everybody to think (as I do) that war is poison, and not (as so many think) an over-strong, extremely unpleasant medicine."

The second world war changed Milne's mind, however. He accused his old friend PG Wodehouse, of near-treason for his radio broadcasts from a Nazi internment camp, and in 1940 he published War with Honour, which took a different line from his earlier assertion that "war is something of man's own fostering, and if all mankind renounces it, then it is no longer there".