The story began as a sequel to Tolkien's earlier, less complex children's fantasy novel The Hobbit (1937), but eventually developed into a much larger work.
This story was before the children's  novel The Hobbit (1937). It turned into a much larger work.