 During World War II , Ian Fleming had mentioned to friends that he wanted to write a spy novel . It was not until 1952 , however , shortly before his wedding to his pregnant girlfriend , Ann Charteris , that Fleming began to write Casino Royale , to distract himself from his forthcoming nuptials . Fleming started writing on his first book , Casino Royale , at his Goldeneye estate in Jamaica on 17 February 1952 , typing out 2 @,@ 000 words in the morning , directly from his own experiences and imagination . He finished work on the manuscript in just over a month , completing it on 18 March 1952 . Describing the work as his " dreadful oafish opus " , Fleming showed it to an ex @-@ girlfriend , Clare Blanchard , who advised him not to publish it at all , but that if he did so , it should be under another name . Fleming went on to write a total of twelve Bond novels and two short story collections ; he died on the morning of 12 August 1964 . The last two books — The Man with the Golden Gun and Octopussy and The Living Daylights — were published posthumously . 
