Tolkien based his novels on a variety of sources. One major source was his deep knowledge of mythology, both from different cultures like Norse and Celtic, which inspired the creation of races such as the dwarves and elves. His experiences in World War I also influenced his work. The horrors he witnessed in the war were reflected in the darkness and destruction present in Middle - earth. Additionally, his academic study of languages was a crucial factor. He created his own languages for the races in his novels, and the development of these languages often drove the creation of the stories and cultures associated with them.
Tolkien based his novel on his love for languages and his extensive study of them. He was fascinated by the structure and history of languages. His own created languages like Sindarin and Quenya were the foundation for the cultures and races in his novels. Another aspect was his passion for mythology. The old tales of heroes, gods, and magical creatures gave him the ideas for characters and plot elements in his stories. Also, his personal experiences, especially his time in the military, might have contributed to the themes of heroism, sacrifice, and the struggle against evil in his novels.