"Leaf by Niggle" is a short story written by J. R. R. Tolkien in 1938-39 and first published in the Dublin Review in January 1945. It can be found, most notably, in Tolkien's book titled "Tree and Leaf," and in other places. This is notable because the book, consisting of a seminal essay called "On Fairy-Stories" and "Leaf by Niggle," offers the underlying philosophy (Creation and Sub-Creation, see below) of much of Tolkien's fantastical writings.
"Leaf by Niggle" is very much an allegory of Tolkien's own creative process, and, to an extent, of his own life.
In the story, an artist, named Niggle, lives in a society that does not much value art. Working only to please himself, he paints a canvas of a great Tree, in the middle of a Forest, with many other trees around as well. He invests each and every leaf of his tree with obsessive attention to detail, making every leaf uniquely beautiful (of course, he niggles over each one!). Niggle ends up discarding all his other artworks, or tacks them onto the main canvas, which becomes a single vast embodiment of his vision.
However, there are many mundane chores and duties that prevent Niggle from giving his work the attention it deserves, so it remains incomplete and is not fully realized.
At the back of his head, Niggle knows that he has a great trip looming, and he must pack and prepare his bags.
Also, Niggle's next door neighbor, a gardener named Parish, is the sort of neighbor who always drops by whining about the help he needs with this and that. Moreover, Parish is lame of foot and has a sick wife, and honestly needs help -- Niggle, having a good heart, takes time out to help.
And Niggle has other pressing work duties that require his attention. Then Niggle himself catches a chill doing errands for Parish in the rain.
Eventually, Niggle is forced to take his trip, and cannot get out of it. He has not prepared, and as a result ends up in a kind of institution, in which he must perform menial labor each day.
Eventually he is paroled from the institution, and he is sent to a place in the country to work as a gardener in a forest. But he discovers that the forest is in fact the Tree and Forest of his great painting, now long abandoned in the home to which he cannot return -- but the Tree here and now in this place is the true realization of his vision, not the flawed and incomplete form of his painting.
Niggle is reunited with his old neighbor, Parish, who now proves his worth as a gardener, and together they make the Tree and Forest even more beautiful. Finally, Niggle journeys farther and deeper into the Forest, and beyond into the great mountains that he only faintly glimpsed in his painting.
Of course, the allegory of "Leaf by Niggle" is life, death, purgatory, and paradise. Niggle is not prepared for his unavoidable trip, as humans often are not prepared for death. His time in the institution and subsequent discovery of his Tree represent purgatory and heaven.
But "Leaf by Niggle" is also about Tolkein's profoundly religious philosophy of Creation and Subcreation. True Creation is the exclusive province of God, and those who aspire to Creation can only make echos (good) or mockeries (evil) of truth. The Subcreation of works that echo the true creations of God is one way that mortals honor God.
(This philosophy is evident in The Silmarillion -- one Vala, Morgoth, creates the orc race as a foul mockery of the elf. Another Vala, Aule, creates the dwarf race as an act of Subcreation that honored God (called Eru in JRRT's invented mythology), and which God accepted and made real, just as Niggle's Tree was made real.)
Niggle's yearnings after truth and beauty (God's creations) are echoed in his great painting; after death, Niggle is rewarded with the realization (the making-real) of his yearning. Or, if you prefer, Niggle's Tree always existed -- he simply echoed it in his art.
On a meta-level, then, JRRT's Middle-Earth is itself a Subcreation designed to honor the true stories of the world-that-is. Thus, Middle-Earth, despite it's lack of overt religious elements, is a profoundly religious work.
Thus, on a final level of allegory, Tolkien himself is Niggle -- and, humorlously, in mundane matters as well as spiritual ones. JRRT was compulsive in his writing, his revision, his desire for perfection in form and in the "reality" of his invented world, its languages, its chronologies, its existence. Like Niggle, Tolkien came to abandon other projects or graft them onto his "Tree," Middle-Earth. Like Niggle, Tolkien faced many chores and duties that kept him from the work he loved. And like Niggle, Tolkien was a horrible procrastinator -- late in life, Tolkien spent hours playing solitary card games instead of working on Middle-Earth.
Finally, Tolkien himself might have disagreed with an allegorical interpretation. He wrote, in Letter 131 of The Letters of J. R. R. Tolkien, "I dislike Allegory." And in specific reference to Niggle, he wrote in Letter 241, "It is not really or properly an 'allegory' so much as 'mythical'." On the other hand, in Letter 153 he said, "I tried to show allegorically how [subcreation] might come to be taken up into Creation in some plane in my 'purgatorial' story Leaf by Niggle."