It is probable that his travails provided the inspiration for Daniel Defoe's novel Robinson Crusoe.
At an early period he was engaged in buccaneer expeditions to the South Seas and in 1703 joined in with the expedition of famed privateer and explorer William Dampier. While Dampier was captain of the St. George, Selkirk served on the galleon Cinque Ports, the St. George's companion, as a sailing master serving under Thomas Stradling.
Hearing strange sounds from the inland, which he feared were dangerous beasts, Selkirk remained at first along the shoreline. During this time he camped in a small cave, ate shellfish and scanned the ocean daily for rescue, suffering all the while from loneliness, misery and remorse. Hordes of raucous sea lions, gathering on the beach for the mating season, eventually drove him to the island's interior. Once there, his way of life took a turn for the better. More foods were now available: feral goats, introduced by earlier sailors, provided him meat and milk; wild turnips, cabbage, and black pepper berries offered him variety and spice. Although rats would attack him at night, he was able, by domesticating and living near feral cats, to sleep soundly and in safety. (After his rescue, he was to live with cats in Lower Largo.)
Selkirk proved resourceful in using equipment from the ship as well as materials that were native to the island. He built two huts out of pimento trees. He used his musket to hunt goats and his knife to clean their carcasses. As his gunpowder dwindled, he had to chase prey on foot. During one such chase he was badly injured when he tumbled from a cliff, lying unconscious for about a day. (His prey had cushioned his fall, sparing him a broken back.) He read from the Bible frequently, finding it a comfort to him in his condition and a mainstay for his English.
When Selkirk's clothes wore out, he made new garments from goatskin, using a nail for sewing. The lessons he had learned as a child from his father, a tanner, helped him greatly during his stay on the island. As his shoes became unusable, he had no need to make new ones, since his toughened, callused feet made protection unnecessary. He forged a new knife out of barrel rings left on the beach.
Two vessels had arrived and departed before his escape, but both of them were Spanish: as a Scotsman and privateer, he risked a terrible fate if captured. He hid himself from these crews.
His long-anticipated rescue occurred on 2 February 1709 by way of the Duke, a privateering ship piloted by the above-mentioned William Dampier. Selkirk was discovered by the Duke's captain, Woodes Rogers, who referred to him as Governor of the island. Now rescued, he was almost incoherent in his joy. The agile Selkirk, catching two or three goats a day, helped restore the health of Rogers' men. Rogers eventually made Selkirk his mate, giving him independent command of one of his ships. Rogers' A cruising voyage round the world: first to the South-Sea, thence to the East-Indies, and homewards by the Cape of Good Hope was published in 1712 and included an account of Selkirk's ordeal.
Journalist Richard Steele interviewed Selkirk about his adventures and wrote a much-read article about him in The Englishman.
Early in 1717 Selkirk returned to Lower Largo but stayed only a few months. There he met Sophia Bruce, a sixteen-year-old dairymaid. They eloped to London but apparently did not marry. In March 1717 he again went off to sea. While on a visit to Plymouth, he married a widowed innkeeper. According to the ship's log, Selkirk died at 8 p.m. on 13 December 1721 while serving as a lieutenant on board the Royal ship Weymouth. He probably succumbed to the yellow fever which had devastated the voyage. He was buried at sea off the west coast of Africa.
Oh, Alexander Selkirk knew the plight
Of being king and government and nation.
''A road, a mile of kingdom, I am king
Of banks and stones and every blooming thing.