Lewis described the origin of The Lion, the Witch and the Wardrobe in an essay titled "It All Began with a Picture":
- The Lion all began with a picture of a Faun carrying an umbrella and parcels in a snowy wood. This picture had been in my mind since I was about sixteen. Then one day, when I was about forty, I said to myself: 'Let's try to make a story about it.'
Shortly before the Second World War many children were evacuated from London to the English countryside to escape bomber attacks on London by Nazi Germany. On 2 September 1939 three school girls, Margaret, Mary and Katherine, came to live at The Kilns in Risinghurst, Lewis's home three miles east of Oxford city centre. Lewis later suggested that the experience gave him a new appreciation of children and in late September he began a children's story on an odd sheet that has survived as part of another manuscript:
- This book is about four children whose names were Ann, Martin, Rose and Peter. But it is most about Peter who was the youngest. They all had to go away from London suddenly because of Air Raids, and because Father, who was in the Army, had gone off to the War and Mother was doing some kind of war work. They were sent to stay with a kind of relation of Mother's who was a very old professor who lived all by himself in the country.
How much more of the story Lewis then wrote is uncertain. Roger Lancelyn Green thinks that he might even have completed it. In September 1947 Lewis wrote in a letter about stories for children: "I have tried one myself but it was, by the unanimous verdict of my friends, so bad that I destroyed it."
The plot element of entering a new world through the back of a wardrobe had certainly entered Lewis's mind by 1946, when he used it to describe his first encounter with really good poetry:
- I did not in the least feel that I was getting in more quantity or better quality a pleasure I had already known. It was more as if a cupboard which one had hitherto valued as a place for hanging coats proved one day, when you opened the door, to lead to the garden of the Hesperides ...
In August 1948, during a visit by an American writer, Chad Walsh, Lewis talked vaguely about completing a children's book he had begun "in the tradition of E. Nesbit". After this conversation not much happened until the beginning of the next year. Then everything changed. In his essay "It All Began With a Picture" Lewis continues: "At first I had very little idea how the story would go. But then suddenly Aslan came bounding into it. I think I had been having a good many dreams of lions about that time. Apart from that, I don't know where the Lion came from or why he came. But once he was there, he pulled the whole story together, and soon he pulled the six other Narnian stories in after him."
The major ideas of the book echo lines Lewis had written fourteen years earlier in his alliterative poem The Planets:
- ... Of wrath ended
- And woes mended, of winter passed
- And guilt forgiven, and good fortune
- JOVE is master; and of jocund revel,
- Laughter of ladies. The lion-hearted
- ... are Jove's children.
This resonance is a central component of the case, promoted chiefly by Oxford University scholar Michael Ward, for the seven Chronicles having been modelled upon the seven classical astrological planets, The Lion, the Witch and the Wardrobe upon Jupiter.
On 10 March 1949 Roger Lancelyn Green dined with Lewis at Magdalen College. After the meal Lewis read two chapters from his new children's story to Green. Lewis asked Green's opinion of the tale and Green said that he thought it was good. The manuscript of The Lion, the Witch and the Wardrobe was complete by the end of March 1949. Lucy Barfield received it by the end of May. When on 16 October 1950 Geoffrey Bles in London published the first edition, three new "chronicles", Prince Caspian, The Voyage of the Dawn Treader and The Horse and His Boy, had also been completed.