Alexander Robertson was born on 15 November 1806 at his parents' farm (Horseupcleugh in the parish of Longformacus, Berwickshire) and baptised at Longformacus on 12 December 1806. He was the youngest of ten children of John Robertson and Margaret Edington/Idington. John and Margaret were tenant hill farmers, but Alexander and two of his brothers (Walter, who became a Parochial School Master and John, who became a Church of Scotland Minister) studied at university while their other siblings were agricultural labourers.
According to Edinburgh University Archives he 'matriculated in medicine in 1824-25 and 1827-28' and obtained the LRCSEd on 3rd April 1833.
On 9 June 1836, he married Jean Gowans, the daughter of John Gowans, a farmer of Carlaverock, Tranent. Alexander and Jean had three children:
- Alison Gray Robertson, born 19 July 1837, Yester, East Lothian
- Margaret Robertson, born 29 November 1838, Yester, East Lothian
- Alexandrina Jane Robertson, born 1 September 1840, Saltoun, East Lothian
Alexander died sometime before Alexandrina was born. An entry in the Saltoun parish register reads: “Jane Gowans widow of Alexander Robertson late a Surgeon in Gifford [i.e. Yester] had a posthumous child named Alexandrina Jane born 1st September 1840 & baptized same month.”