The Peoples of Middle-earth by J.R.R. Tolkien
This is more about the writing of The Lord of the Rings -- to be more precise, of its Appendices. It fares wide and far over the whole of Middle-Earth. From scraps about making Celerimbor a descendant of Feanor, which made it necessary to work out which of his sons married, to Tolkien working out the "original" hobbit names that were "translated" to the forms in LOTR, down to the solemn observation that "Lobelia" is merely his best guess as to the flower she was named after. Ideas he played with, such as the question of whether Tar-Miriel was unwilling to marry Ar-Pharazon, and the story where one of Feanor's twin sons died at the Burning of the Ships.