The story of the elves leaving Middle-Earth is a tragic one. In the final chapters of "The Silmarillion," a great battle known as the War of the Ring takes place, where the armies of Men and Elves join forces to defeat the forces of darkness. After the war is won, the elves realize that the world is changing and they no longer feel at home in Middle-Earth. As a result, they decide to sail west towards the Undying Lands, where they can live in peace and harmony with the Valar, the angelic beings who rule over the world.