An extraordinary stash of letters that shine a light on the tangled relationship between the James Bond creator, Ian Fleming, and his wife, Ann, from their intense and secret affair to the bitter end of their marriage, are to appear at auction.

Sotheby’s is selling more than 160 letters between the couple, written over 20 years. Gabriel Heaton, a specialist in books and manuscripts at the auction house, said the letters in their scope and scale provided what “must surely be an unmatchable record of the life of the author as his fortunes changed”.

They also provide insight into the rise of Bond. Heaton said it was no coincidence that Fleming wrote his first Bond novel, Casino Royale, in the year of his marriage.

Ian Fleming had numerous flings and affairs with other women. Photograph: ©The Cecil Beaton Studio Archive at Sotheby's

It was “both as an outlet for his libido and imagination, and also in an attempt to make money for a woman who was used to being unthinkingly rich”.

Ann Fleming, née Charteris, was born into the aristocracy and married wealthy men. Her first husband was Shane O’Neill, the 3rd Baron O’Neill. After his death in military action in 1944, she married the newspaper magnate Esmond Harmsworth, the 2nd Viscount Rothermere.

During both marriages she and Fleming were lovers, an intense relationship that had sado-masochistic elements. “I long for you even if you whip me because I love being hurt by you and kissed afterwards,” Ann once wrote to Fleming.

In 1948 Ann became pregnant with Fleming’s child, a girl who was a month premature and lived only eight hours. The collection includes a number of sad and gentle letters written by Fleming on Gleneagles stationery shortly after he played golf with Rothermere, the cuckolded husband.

In one letter he writes: “I have nothing to say to comfort you. After all this travail and pain it is bitter. I can only send you my arms and my love and all my prayers.”

Fleming had numerous flings and affairs with other women and when the couple finally married in 1952 that was never likely to stop.

Ann once wrote to him: “You mention ‘bad old bachelor days’ – the only person you stopped sleeping with when they ceased was me!”

A letter from Fleming written on British Overseas Airways Corporation stationery reads: “In the present twilight, we are hurting each other to an extent that makes life hardly bearable.”

Heaton said the letters were packed with stories of high society, travel, love of nature and gossip.

“They are quite something, it has been a real treat,” he said. “They are an extraordinary read because Ian Fleming is pretty much incapable of writing a dull sentence.”

Fleming wrote all of the Bond novels at GoldenEye, his house in Jamaica, a place visited by many of Ann’s remarkable circle of friends. The artist Lucian Freud, for example, and the Labour leader Hugh Gaitskell, with whom she had a long affair.

There were also surprising visitors. “Truman Capote has come to stay,” Fleming writes. “Can you imagine a more incongruous playmate for me. On the heels of a telegram he came hustling and twittering along with his tiny face crushed under a Russian Commissars’ uniform hat [...] he had just arrived from Moscow.”

The letters consist of more than 500 typed and handwritten pages, at least three written on endpapers torn from books. Two of the letters from Ann are written on the back of a gin rummy card and a hospital temperature chart.

They will be offered in Sotheby’s online literature sale between 3 and 10 December and come with an estimate of £200,000-300,000.

It was important to keep them together, said Heaton. “They are much more than the sum of their parts, the correspondence as a whole is far more substantial and interesting and revealing and exciting than simply an accumulation of individual letters.”