The Hobbit was Tolkien’s first published prose fiction about Middle-earth, appearing in 1937.
Tolkien had already spent years developing the languages, legends, and histories that would become his mythology. However, The Hobbit was the first of that material to reach a wide reading public as a published prose narrative. It follows Bilbo Baggins on a journey with Gandalf and the Dwarves to the Lonely Mountain.
The answer can be confusing because The Book of Lost Tales contains some of Tolkien’s earliest mythological writing, but it was not published during his lifetime and was not his first published Middle-earth prose fiction. The Lord of the Rings followed in three volumes between 1954 and 1955. The Hobbit’s success encouraged Tolkien’s publisher to request a sequel, leading to the much darker and more expansive Ring narrative.