The son of a shoemaker and tanner in Largo, Fife, he was born in 1676. In his youth he displayed a quarrelsome and unruly disposition, and having been summoned on 27 August 1695 before the kirk-session for his indecent behaviour in church, "did not compear, having gone away to the seas".
At an early period he was engaged in buccaneer expeditions to the South Seas, and in 1703 joined the galley Cinque Ports as sailing master. The following year he had a dispute with the captain, and at his own request was in October put ashore on the archipelago of Juan Fernandez off the Chilean coast. After a solitary residence of four years and four months there, he was taken off by Captain Woods Rogers on February 2, 1709. Rogers was commander of a privateer and made Selkirk his mate and afterwards gave him the independent command of one of his prizes. He returned home in 1712. Rogers's "Cruising Voyage" was published in 1712, with an account of Selkirk's ordeal.
In 1717 Selkirk eloped with a country girl and again went to sea. He died in 1723 while lieutenant on board the Royal ship Weymouth.
For the possible influence of Selkirk's story on the novel Robinson Crusoe, see the discussion there.
One of the islands in Juan Fernández has been named Alejandro Selkirk.