Yeap. As I recall, The Hobbit is meant to be Bilbo's story, then LOTR is Frodo and Sam's story that they wrote, and the Silmarillion is supposed to be a collection of Elvish legends that Bilbo wrote up during his stay in Rivendell.
That all got put into the Red Book of Westmarch, and that in turn eventually found its way into the hands of Aelfwine the Sailor (however that's spelt, Old English was never my thing), an Anglo-Saxon who accidentally found the island of Tol Eressa (again, spelling) and was given the book by the elf ghosts that remained there. He translated it into Old English.
After *that* it was discovered in an archaeological dig and brought to a man who was one of the foremost experts in Old English at the time.
One Professor John Ronald Reuel Tolkien.