The Alchemist tells the story of a young shepherd named Santiago who is able to find a treasure beyond his wildest dreams. Along the way, he learns to listen to his heart and, more importantly, realizes that his dreams, or his Personal Legend, are not just his but part of the Soul of the Universe.
Santiago is a humble shepherd whose desires are few–he wants to be free to roam with his sheep, to have some wine in his wineskin and a book in his bag. Fate intervenes, however, in the form of the recurring dream of a great treasure hidden thousands of miles away at the base of the Egyptian Pyramids. When Santiago meets Melchizedek, a strange wise man who claims he is a king from a far-off land, he decides to seek his treasure. The next day, Santiago sells his sheep and embarks to Africa to pursue his dream.
Upon arriving in Africa, though, it becomes apparent that things will not be as easy as he thought. The first day Santiago is in Tangiers, he is robbed and left completely alone, unable to speak a single word of Arabic. At first Santiago contemplates giving up and turning around. He remembers the words of the wise man, though, and decides to carry on–getting a job at a local crystal shop. After working at the crystal shop for a year, learning much about life and about his Personal Legend, Santiago earns enough money to buy a new flock of sheep and return home. At the last minute, though, Santiago decides to risk it all and join a caravan to Egypt.
Once in the caravan, Santiago meets an Englishman who has come all the way to Africa to seek a renowned alchemist. As they travel through the desert, the Englishman tells Santiago about the secrets of alchemy. Santiago finds the Englishman's ideas to be very similar to Melchizedek's. They both speak of a Soul of the World to which we are all connected and of the necessity of following our heart's true desires or our Personal Legend. Santiago, however, prefers to learn these secrets by observing the world, while the Englishman prefers to learn from complex books. While they travel, they begin to hear rumors of a coming tribal war.
When they finally arrive at the Al-Fayoum oasis–the home of the titular Alchemist–Santiago meets a beautiful girl named Fatima with whom he immediately falls in love. He discovers that love, like the Personal Legend, comes directly from the Soul of the World. While walking in the desert, Santiago has a vision of an upcoming battle. He rushes back to warn the elders at the oasis and, when his vision is confirmed, they offer him a position as a counselor. Santiago considers staying at the oasis with Fatima, but the Alchemist finds Santiago and tells him that he will lead Santiago to his treasure.
Once again on the move, the Alchemist teaches Santiago to listen to his heart. Hearts can be treacherous, but the best way to keep them from fooling you is to listen to them intently. Almost to the pyramids, Santiago and the Alchemist are taken prisoner by a warring tribe. The Alchemist tells the tribesmen that Santiago is a powerful magician who can turn himself into the wind. The tribesmen are impressed and will spare the lives of the men if Santiago can do it. The only problem is that Santiago has no idea what he is doing. After three days of meditating, Santiago uses his knowledge of the Soul of the World to ask the elements to help him. First he asks the desert, then he asks the wind, then he asks the sun and, finally, he asks the Soul of the World. Immediately, the wind whips up, and Santiago disappears and reappears on the other side of the camp.
The Alchemist takes his leave of Santiago, who continues on to the Pyramids. Once there, Santiago is attacked by robbers. Asked what he is doing there, Santiago replies that he had a dream of a treasure buried at the base of the Pyramids. One of the robbers laughs at him, and says that he has had the exact same dream, except that in his the treasure was buried in Spain. Santiago realizes that the treasure was back in Spain the entire time.
The story then jumps forward in time and finds Santiago digging a hole at the base of the tree where he had had his first dream. Sure enough, he finds a trunk full of gold–enough for him and Fatima to live happily for a long time.