A secondary world is a fictional world which is neither a geographical nor a temporal part of our world; and is not connected to it as a dream world, a realm of Faerie, a space of Ideas, a land-beyond-a-portal or anything of that sort. Furthermore, the secondary world should be a real world, not just an allegory.For instance, the tall tales that Odysseus tells in the Odyssey are fictional and fantastic, but are not set in a secondary world, because they are supposed to have happened on our Earth. On the other hand, modern fantasy writers like Martin and Jordan do use secondary worlds: no explicit or implied relation exists between their fantastical realms and the world we inhabit.
My question is, what was the first book that introduced a secondary world? I haven't managed to think of any clear examples that predate The Lord of the Rings by more than a few years. This is probably wrong. There were probably secondary worlds before 1948 (the earliest book I can think of; see below). But it is not as easy to find them as you might suppose.
For instance, I cannot think of any ancient examples. Later fantasists like Dante, Ariosto and Rabelais evidently put their creations in our own world. Indeed, we can move far closer to the present day and still find the same. The land of Oz can be reached by stepping into a tornado, and is probably supposed to be somewhere in the American desert. Lord Dunsany's Elfland can be reached by humans. E. R. Eddison's magical realm is, if I recall correctly, presented as a dream. A Voyage to Arcturus brings us to its metaphysical mythology by a journey through space. James Branch Cabell's Poictesme is connected to our world through historical transmission of documents. Peter Pan lives somewhere beyond the ocean. Narnia lies beyond a wardrobe. The pulp writers (Howard, Smith, Lovecraft) often hinted that their tales were set in a distant past or future. Fritz Leiber's characters seem to inhabit a weirdly fluid set of dimensions that might very well include ours. Peake's Gormenghast is obviously somewhere on Earth.
The oldest example of a true secondary world that I can currently think of is The Well of the Unicorn by Fletcher Pratt, which was published in 1948. Its introduction explicitly tells us that our world is "another world than the one discussed here"; and it looks and reads much like a piece of modern fantasy. There even is a map at the beginning of the book.
Again, I doubt that this is the first secondary world. So, my general question to you is: what is the oldest example you can think of? There are bound to be some borderline cases, but I'm interested in anything that you think might fit the bill.