For most of his 93 years, PG Wodehouse, the “performing flea” of English literature, was also an elephant of productivity. Up to his final hours, he wrote every day, accumulating a manuscript mountain: letters to friends, writers and composers, from Evelyn Waugh to George Gershwin, light verse, journals and journalism, libretti, short stories, plays and novels such as Right Ho, Jeeves, and The Code of the Woosters. At the peak of his career in the 1930s, he complained to a friend: “I have become a writing machine.”

Now the Observer can reveal that this lifetime of literary work has reached a remarkable climax. On Thursday, the British Library will announce that the Wodehouse archive is about to join its 20th-century holdings, a collection that includes the papers of Arthur Conan Doyle, Evelyn Waugh, Mervyn Peake, Virginia Woolf, Harold Pinter, Ted Hughes, Beryl Bainbridge, JG Ballard and Angela Carter.

This rare and brilliant archive not only casts fascinating new light on Wodehouse’s comic genius, and painstaking daily revisions of his famously carefree prose, it also holds the key to the controversy that has tormented the writer’s posthumous reputation, the “Berlin broadcasts”. Yet, unlike many authors, he made no attempt to protect this collection, which is all the more authentic for being free of authorial intervention and contrivance.

After his death on Valentine’s Day 1975, many of Wodehouse’s papers found their way to Dulwich College, his former school. Several other manuscripts were already in private hands. Everything else was steadily accumulated and catalogued by the PGW estate, under the direction of Wodehouse scholar Kristin Thompson, and stored in the attic of a farmhouse on the edge of the Sussex Downs.

Devoted American pilgrims move Jeeves, Bertie Wooster and Blandings Castle to Seattle Read more

Sir Edward Cazalet, the principal trustee of the writer’s estate, told the Observer he was “delighted” that the British Library would now provide the home for the PG Wodehouse archive. Cazalet said he believed that “this collection will not only bring much pleasure to its readers, but will also prove to be critical to any serious study of 20th-century humour”. He added that Wodehouse “would have been proud to be counted among his greatest literary heroes”.

This is a momentous acquisition for three outstanding reasons. First, Wodehouse is an English literary immortal, with a God-given ear for the music of an English sentence. Almost as important, he is also renowned for a cast of characters – led by Lord Emsworth, Rupert Psmith, Bertie Wooster and his manservant Jeeves, assorted aunts, Drones and butlers – whose antics, obiter dicta and exploits have passed into the language.

Facebook Twitter Pinterest Wodehouse with Winston Churchill in Leicester during the 1923 general election campaign. Photograph: Hulton Deutsch/Corbis via Getty Images

Second, his archive shows the writer at work in Edwardian England, for instance playing cricket with Conan Doyle, and then later in the heyday of his career during the 1920s and 30s, mixing with the showbiz world of Broadway and 30s Hollywood, from producer Irving Thalberg to Fred Astaire and Cole Porter.

Perhaps most fascinating of all, the crown jewels in this archive are the documents surviving from his imprisonment by the Nazis, notably the pencil diary he kept during internment, hitherto only available to a few scholars.

Thus, third, by placing all his wartime papers in the public domain, the Wodehouse estate should lay to rest any lingering suspicions about his conduct during the dark years of 1940-46. Now, for the first time, admirers and critics alike will be able to see the exact circumstances of his incarceration after the fall of France in 1940.

When the second world war broke out, Wodehouse was living next to the golf course in Le Touquet, as a bestselling literary expatriate. During the phoney war, he stayed in France, working on his masterpiece Joy in the Morning. It was a fateful decision. Once the Blitzkrieg began in May 1940, Wodehouse, who was 58, became involuntarily interned as an “enemy alien”.

Under the terms of the Geneva convention, he could not be released until he was 60. By August 1940, he had been dispatched to a Nazi internment camp, a converted lunatic asylum in Upper Silesia. This was a move that inspired one of his most famous lines. “If this is Upper Silesia, what must Lower Silesia be like?”

Meanwhile, in an elaborate and much-disputed series of moves, the Nazi propaganda machine was plotting to extract maximum publicity value from their celebrated prisoner. Wodehouse, virtually devoid of political savvy, was oblivious to this. His disgrace began in June 1941 when – in an act of insanity that was, he subsequently admitted, “a loony thing to do” – he agreed to make a series of broadcasts to America on German radio. It was largely innocent stuff: assurances to his US readers that he was alive and well, and some horribly ill-judged jokes about his experiences as an internee.

His timing could not have been worse. June 1941 was a low point in the Allies’ conduct of the war. The Nazis, with tank divisions storming across Soviet Russia, seemed on the brink of victory. Wodehouse’s “treachery” became the object of hysterical warmongering in the British media, led by an alliance of the Daily Mirror and the BBC. Trapped in Berlin, he was excoriated high and low, denounced in the Commons and branded a traitor. He – predictably – went to ground, licking his wounds, and only resurfaced in Paris after the liberation in 1944, when he turned himself over to the authorities.

Facebook Twitter Pinterest Wodehouse outside Hunstanton Hall, the Norfolk home of his friend Charles le Strange, 1928. Photograph: Sasha/Getty Images

Wodehouse was interrogated by journalist Malcolm Muggeridge and an MI5 barrister, found to be politically inept and guilty of “unwise” behaviour. An official report exonerated him of everything except stupidity. Inexcusably, the establishment never advised him of these findings, and he would be tormented by his tragic error for the next 30 years.

The mud, meanwhile, had stuck. If his second world war experience did not actually take away his life, his involuntary detention in Nazi Germany and its contentious aftermath wrecked it for ever. For the rest of his long career, he would be tarred with a variety of cruel and wholly inaccurate labels: “Nazi”, “collaborator”, “traitor”, “Goebbels’ stooge” and so on.

Hurt, puzzled and embarrassed, he went into exile in America, and died there, 30 years later, loved for his work, largely unknown for himself, imprisoned by his enemies in his wartime reputation, and by his fans in ecstatic and uncritical adulation.

Towards the end, there were some belated establishment moves – notably a knighthood – to signal official forgiveness. Wodehouse himself could never quite get over his disgrace and refused to consider returning home to the country he loved, despite unofficial overtures from, among others, the Queen Mother.

The British Library’s acquisition of his archive marks a milestone in the Wodehouse drama. British Library curator Kathryn Johnson, who has tracked these documents for more than a decade, told the Observer that “we are so glad that this priceless collection is now safely in public hands, where we can look after it for the nation”. Johnson sees this reconciliation as part of a larger re-evaluation of Wodehouse as a writer. “People are coming to acknowledge,” she says, “that he was a truly great English stylist.” Johnson recognises the aura of controversy that surrounds the Wodehouse name. “We will of course handle items like his wartime diary and the related correspondence with the greatest care and discretion,” she said.

Roly Keating, chief executive of the British Library, also salutes the timeliness of this move: “It’s right and proper that he’s taking his place alongside key contemporaries such as Kipling and Waugh – not to mention the greats of the literary canon.”

As usual with Wodehouse, professional decorum rarely survives an encounter with the infectious gaiety of his work. “On a completely personal note,” added Keating, “I’m thrilled that Wodehouse is joining the national collection. I’ve always loved the sheer distilled joy of his writing, and it’s wonderful to know that researchers will have such intimate access to his work process and private voice. Great comic writing always feels effortless, but archives like this expose what goes on behind the scenes.”

Wodehouse was a writer who loved to play with the English language in almost any register, so long as it was entertaining. For a writer, steeped in the English literary tradition, from Shakespeare to Gilbert & Sullivan, this move to the national library could scarcely be a sweeter kind of posthumous redemption.

Top 10 Wodehouse quotations

I’m not absolutely certain of the facts, but I rather fancy it’s Shakespeare who says that it’s always just when a fellow is feeling particularly braced with things in general that fate sneaks up behind him with the bit of lead piping. Carry on, Jeeves

He spoke with a certain what-is-it in his voice, and I could see that, if not actually disgruntled, he was far from being gruntled. The Code of the Woosters

She fitted into my biggest armchair as if it had been built round her by someone who knew they were wearing armchairs tight about the hips that season. My Man Jeeves

Sir Roderick Glossop is always called a nerve specialist, because it sounds better, but everybody knows that he’s really a sort of janitor to the looney-bin. The Inimitable Jeeves

It was my uncle George who discovered that alcohol was a food well in advance of medical thought. The Inimitable Jeeves

It’s no use telling me that there are bad aunts and good aunts. At the core, they are all alike. Sooner or later, out pops the cloven hoof. The Code of the Woosters

Into the face of the young man … who sat on the terrace of the Hotel Magnifique at Cannes there had crept a look of furtive shame, the shifty hangdog look which announces that an Englishman is about to speak French. The Luck of the Bodkins

It is a good rule in life never to apologise. The right sort of people do not want apologies, and the wrong sort take a mean advantage of them. The Man Upstairs

The fascination of shooting as a sport depends almost wholly on whether you are at the right or wrong end of the gun. The Adventures of Sally

As for Gussie Finknottle, many an experienced undertaker would have been deceived by his appearance and started embalming on sight. Right Ho, Jeeves