Middle-earth is the setting of much of the English writer J. R. R. Tolkien's fantasy. The term is equivalent to the Miðgarðr of Norse mythology and Middangeard in Old English works, including Beowulf. Middle-earth is the human-inhabited world, that is, the central continent of the Earth, in Tolkien's imagined mythological past. Tolkien's most widely read works, The Hobbit and The Lord of the Rings, are set entirely in Middle-earth. "Middle-earth" has also become a short-hand term for Tolkien's legendarium, his large body of fantasy writings, and for the entirety of his fictional world.
Middle-earth is the main continent of Earth (Arda) in an imaginary period of the Earth's past, ending with Tolkien's Third Age, about 6,000 years ago. Tolkien's tales of Middle-earth mostly focus on the north-west of the continent. This part of Middle-earth is suggestive of Europe, the north-west of the Old World, with the environs of the Shire reminiscent of England, but, more specifically, the West Midlands, with the town at its centre, Hobbiton, at the same latitude as Oxford.
Tolkien's Middle-earth is peopled not only by Men, but by Elves, Dwarves, Ents, and Hobbits, and by monsters including Dragons, Trolls, and Orcs. Through the imagined history, the peoples other than Men dwindle, leave or fade, until, after the period described in the books, only Men are left on the planet.
Tolkien's stories chronicle the struggle to control the world (called Arda) and the continent of Middle-earth between, on one side, the angelic Valar, the Elves and their allies among Men; and, on the other, the demonic Melkor or Morgoth (a Vala fallen into evil), his followers, and their subjects, mostly Orcs, Dragons and enslaved Men. In later ages, after Morgoth's defeat and expulsion from Arda, his place is taken by his lieutenant Sauron, a Maia.
The Valar withdrew from direct involvement in the affairs of Middle-earth after the defeat of Morgoth, but in later years they sent the wizards or Istari to help in the struggle against Sauron.