The Return of the King: Being the Third Part of the Lord of the Rings · Chapter 20
Departure from the Grey Havens
Frodo, bearing wounds that will not heal, departs Middle-earth with Bilbo, Gandalf, and the Elves from the Grey Havens. They sail West into the High Sea, leaving Sam, Merry, and Pippin to return to the Shire.
Outcome
The Ring-bearers find peace in the West; Sam returns to Rosie and their family; the age of the Elves ends in Middle-earth.