Apparently many readers of The Lord of the Rings are disappointed when Frodo, having struggled heroically to reach Mount Doom in the wastelands of Mordor, fails at the last and claims the ring for himself, refusing to destroy it. Since I first read the book 50 years ago I can't remember my reaction but I suspect I may have shared in the disappointment. I certainly understand it. It's not what you expect to happen to a hero.
But this shows Tolkien's genius and ability to go more deeply into the reality of the human soul than many other more vaunted writers. More vaunted by academia anyway. Because, from a Christian perspective, it is absolutely the right thing to happen. For the Christian cannot claim complete goodness, still less holiness, for himself. All goodness comes from God and all we can do is turn ourselves, heart, mind and soul, over to God, letting him work through us. This we do by cleansing ourselves of sin, pride, anger and all the rest. Then God acts.
The point is we cannot become spiritual by our own efforts. Ultimately, we must rely on grace. Our own efforts are essential to bring us to the point where grace may operate, see Frodo's long and arduous trek to Mordor during the course of which he has to sacrifice nearly everything. But the final transformation of an earthly being into a real spiritual one depends on the grace of God.
Frodo did all that any mortal being could have done and it required an exceptionally high rate of personal purity and integrity even to do that. Nonetheless his personal qualities were not sufficient to accomplish an act the achievement of which went beyond mortal power. This is why Providence had to intervene at the last. But Providence was only able to intervene because of the mercy and compassion that Frodo had shown before to Gollum, and because of Frodo's personal heroism and sacrifice God was able to turn evil (Gollum in his fallen state) into good where good itself or human good was not able to finish the task.
Christianity has been criticised, most famously by Nietzsche, because it seems to favour the weak over the strong, supposedly leading in our day to the celebration of the perceived victim as the purest and most lacking in sin of any human being. The last will be first and all that. But actually Christianity does not favour the weak at all. Christianity has no time for weakness. It favours the strong. But it favours the spiritually strong not those who may be rich and powerful but who are steeped in sin and worldliness. Those people are the true weak when viewed correctly. Frodo may have been one of the little ones in the eyes of the world but seen with the eye of spirit he was a giant. Christianity has compassion for the weak and suffering but those who are highest in its estimation are the strong in spirit who fight and sacrifice and endure. There's nothing weak about these people. They are a vital bulwark against the evil that would otherwise overrun the world as it nearly did in Tolkien's story.
Frodo failed in one sense because he was unable to see his task through to the end by himself. But he succeeded in a greater sense because he brought his mission to the point at which the desired result could be effected. Tolkien's depiction of this spiritual struggle (which is obviously what it was) is all the subtler for showing us failure. "I can of myself do nothing". This is the lesson we must all eventually learn.