J.R.R. Tolkien was a philologist at Oxford before becoming famous as the author of Middle-earth.
Philology is the historical study of languages and written texts, including how words, grammar, and literary traditions change over time. Tolkien’s professional work focused especially on Old and Middle English, Old Norse, and related Germanic languages. His scholarship deeply informed the invented languages and historical layers of his fiction.
He became Rawlinson and Bosworth Professor of Anglo-Saxon at Oxford in 1925, then Merton Professor of English Language and Literature in 1945. His academic career gave him the expertise to construct languages with consistent sound patterns, vocabulary, and relationships rather than treating them as random collections of unusual words.
“Linguist” is a reasonable broad description of Tolkien’s interests, but philologist is the more precise historical term for his profession and academic field. He was also a literary scholar and professor, yet his language-based research is the clearest answer to this question.