Night is falling as Santiago reaches the abandoned church. The tree is still growing up through the broken roof, and he remembers the time he slept there and had the dream about the pyramids. This time he does not have his sheep, but he has a shovel. He thinks of the night in the desert when he and the alchemist sat outside the alchemist’s tent and looked at the stars. He realizes that God has chosen a strange way to show him his treasure, but because he went on his quest to Egypt, Santiago met so many people that he would not otherwise have encountered.
Santiago now returns to Spain and to the place where his story began. This physical return brings everything full circle, and the abandoned church acts as a bookend for the novel. The church is a holy place, but also a natural place (because of the tree growing through it). The holy and the natural have always been connected in Santiago’s story, and have suggested a more universal nature of spirituality that is meant to transcend individual religious dogma. Santiago now sees that his quest was valuable in itself, despite the fact that it ends where it began. On one level, the book has basically been a longer, more detailed version of the Ralph Waldo Emerson quote, “Life is a journey, not a destination.”
Santiago falls asleep and wakes up when the sun is high. He then shouts at the sky, "you knew the whole story!" He sees that God even prepared for his return journey with the gold that the alchemist left with the monk. Santiago asks God if he couldn't have spared him from the laughter of the monk when he returned to the monastery in tatters. A voice on the wind replies that he could not, because this allowed him to see the beautiful pyramids. Santiago smiles and begins to dig. In half an hour he has revealed a chest of Spanish gold coins, along with precious stones and gold masks. This treasure was forgotten long ago.
Santiago now speaks directly to God, realizing the irony of his own inability to see the big picture, while God always could. After all that Santiago has experienced and the true love that he seems to have found along the way, a treasure that is only gold and jewels almost seems like a letdown—something entirely worldly as a reward for a journey that was almost entirely spiritual.
Santiago takes Urim and Thummim out of his bag and adds them to the chest. They are also part of his treasure, and they remind him of the old king Melchizedek. Santiago reflects that life is generous to those who seek out their Personal Legend. He remembers that he needs to go to Tarifa to give one tenth of his treasure to the fortune-teller, as he had promised long ago.
Santiago sees that he has received such great generosity and blessings from God because he has purely pursued the path to his Personal Legend, and has not let himself hesitate or fall into a trap of fear. He does the right thing by fulfilling his promise, and he has learned the value of commitment. This is a well-ordered, satisfying, and “happy” ending, but as Coelho clearly intends the book as a kind of parable or moral lesson, it is also somewhat problematic, as some critics have noted. Taken to its logical conclusion, the lesson of the book seems to imply that if someone is unhappy, unfulfilled, or even poor, there is nothing to be done about it—it is either their own fault for not properly pursuing their “Personal Legend,” or it has just been “written” that way.
The wind begins to blow, and it brings with it a familiar scent of perfume, as well as a kiss from far away. Santiago smiles and says, "I'm coming, Fatima."
The book ends with the suggestion that Santiago will return to Fatima and prove that their love is indeed pure and true, and is therefore incorruptible (like the metals the alchemist compared it to). It’s also assumed, of course, that Fatima has been faithfully waiting for Santiago all this time. The two lovers are connected through the Soul of the World, even when they are hundreds of miles apart. Santiago has learned all his lessons and achieved his treasure, and now he can return to the oasis—that place of peace and life in the middle of a war-torn desert—and live happily ever after.