Picture the writer J. R. R. Tolkien, author of the international best-sellers The Hobbit and The Lord of the Rings. Writers, especially those who have been dead for 50 years, are not particularly recognizable celebrities, but you might imagine a tweedy, waistcoated Oxford professor, surrounded by books, puffing a pipe. Not unlike a hobbit, in fact—kindly and comfortably well off.

And you would be right, except in one respect: for most of his life, Tolkien struggled, often desperately, with money. Until his very last years, he earned little from his books, and when he finally did see profits, it was too late for him to enjoy them.

What I have found surprising in studying Tolkien is not only how much his whole life was shaped by money—that is true of many writers—but that the direct consequences of his financial difficulties proved to be astonishing.

The house in Oxford where Tolkien wrote The Hobbit and some of The Lord of the Rings.

Tolkien’s father was a banker but died working abroad when his son was just three, and Tolkien’s mother died eight years later. His education was made possible by scholarships, first to King Edward’s School and then to Oxford University, where he studied classics.

However, Tolkien did poorly in his second-year exams and almost lost his funding; he was saved only by his brilliant performance in a paper on comparative philology (the study of the relationships between different languages). In order to keep his funding, he was advised by his college to switch his degree to English language and literature.

Here, he excelled, taking first-class honors and soon becoming a professor, first at the University of Leeds and then back at Oxford. Tolkien’s career as a scholar of English language and literature was, then, a necessary step taken to retain his scholarship.

However, his salary was meager, and he had a wife and, soon, four children to support. Consequently, Tolkien took on extra work, and for many years spent summers marking school exam papers, often staying up into the early hours to complete them.

One night, Tolkien later claimed, he turned the page of an answer booklet to find a blank sheet of paper, and, driven by an inexplicable impulse, straight away wrote on it the words “In a hole in the ground there lived a hobbit.” What was a hobbit? No one knew, so he began to tell his children a bedtime story about a hobbit named Bilbo Baggins—a highly unexpected side effect of his freelance exam-marking.

It was just one among a number of children’s stories that Tolkien had written, illustrated, and sent to publishers, but The Hobbit was the only one to reach print (in 1937, when he was 45), winning him praise, if not riches.

A first edition of the Lord of the Rings trilogy, whose rough drafts Tolkien later sold to a U.S. university to make ends meet.

His publishers were keen for a sequel—with more hobbits—so he began a story modeled on the earlier book that grew into something far more profound: The Lord of the Rings. This novel, written under extreme circumstances during the Second World War and its aftermath, was eventually published in 1954 and 1955. It, too, was highly acclaimed, and its sales were solid, but the postwar market was limited for an expensive, three-volume hardback novel, and the books were not released in paperback.

One night, Tolkien, driven by an inexplicable impulse, wrote the words “In a hole in the ground there lived a hobbit.” What was a hobbit? No one knew.

To make ends meet, just 15 months later Tolkien found himself negotiating the sale of his rough drafts of The Hobbit and The Lord of the Rings to Marquette University, in Milwaukee. This amounted to a pile of papers seven feet high, which went for the comparatively trifling sum of £1,500 (about $65,000 today, a tiny fraction of what they are now worth).

But Tolkien’s money problems continued. An unlicensed paperback of The Lord of the Rings appeared in the U.S. and sold in large numbers, from which Tolkien, of course, made nothing. Although this spurred his American publishers to issue their own paperback, once Tolkien did finally begin to get paid, he was landed with a substantial tax bill.

Tolkien was averse to the cinema, but eventually he opted to sell the film rights to The Lord of the Rings because he needed the money.

This tax demand appears to be one of the reasons, if not the main reason, for Tolkien’s selling the film rights to The Hobbit and The Lord of the Rings. Negotiations began in 1967 and were finally settled in 1969. Tolkien’s own aversion to the cinema, and the subsequent reluctance of the Tolkien estate to license his other work to filmmakers, means that without that tax bill to settle, Sir Peter Jackson would never have had the opportunity to make his six blockbuster movies, and we would not now be looking forward to Season Two of The Rings of Power.

In the end, Tolkien had precious little time in which to enjoy the fruits of his labors. Within two years of the film rights being sold—and now in affluent retirement—his wife died, and he was buried just two years later, in 1973.

He had spent most of his life as a struggling academic, and would never have dreamed of the global renown in which he would subsequently be held. Even less, as he worried about school fees and the future of his family, would Tolkien have believed that within just 30 years of his death, his work would become a multi-billion-dollar cultural industry?

Nick Groom’s Tolkien in the Twenty-First Century: The Meaning of Middle-Earth Today will be published on September 5 by Pegasus