A lthough the surname of Ainslie is of great antiquity in Scotland, it was already prominent in England before the Norman Conquest. The Saxon lords of Annesley in Nottinghamshire held large estates, but they fled in the face of the advancing forces of William the Conqueror to Scotland, where they were received generously by Malcolm III. They soon became settled in lands around Dolphinstone. William de Ainslie, a canon of Glasgow Cathedral, witnessed a charter by Walter, Bishop of Glasgow, around 1208. In 1221 Thomas de Ainslie was one of the medi-ators appointed to settle a dispute between the monks of Kelso and the bishopric of Glasgow. Sir Aymer de Aynesley was a Borders knight sent to treat with the English to settle the marches in 1249. There are two references to the family in the Ragman Roll listing those who submitted to Edward I of England in 1296: John de Anesleye of Roxburghshire and Johan de Anesley of Cruwfurt in Lanarkshire. Robert de Ainslie, Baron of Dolphinstone, accompanied his kinsman Patrick, Earl of Dunbar and March, on a crusade to the Holy Land between 1248 and 1254. It seems likely that the Laird of Dolphinstone who swore fealty to Edward I was the crusader’s son, John. The Ainslies were opposed to Robert the Bruce in his campaign to win the Scottish Crown and paid for this by the forfeiture of their estates. However, the family returned to favour when William de Ainslie, who had married Helen Kerr (of the family from which the present Duke of Roxburghe descends), became a favourite of Robert II. The estates of Dolphinstone were restored to him in 1377. The Ainslies secured their fortunes by strategic alliances by marriage with other prominent Borders families. They intermarried with the Pringles, Douglases, Homes and Kerrs. Marjory, daughter of John Ainslie, married Mark Kerr of Cessford, a doughty warrior known as the Terror of the Borders.
He was killed at the Battle of Pinkie in 1547. Robert Ainslie, a lawyer who was to become a friend and confidant of the poet Robert Burns, was born on 13 January 1766. He made the poet’s acquaintance in Edinburgh in the spring of 1787, and they travelled through the Borders together, Ainslie being received at Burns’ family home. He later visited Burns at Ellisland where he was given a manuscript copy of Tam o’ Shanter, which he later presented to the writer Sir Walter Scott. One of his brothers, Sir Whitelaw Ainslie, was medical superintendent of the Southern Division of India and the author of a detailed work on Indian native medicine. He was a regular contributor to the Edinburgh Magazine, and wrote a number of plays. Sir Robert Ainslie was the British ambassador to the Ottoman Empire at Constantinople from 1776 to 1792. He also served as a Member of Parliament and was created a baronet in 1804. He is now best remembered for three volumes of drawings and sketches of Egypt. The Ainslie arms clearly allude to their early crusading exploits but even in more recent times they have enjoyed high military rank. General Charles de Ainslie commanded the 93rd Highland Regiment, which has now passed into legend as the ‘Thin Red Line’, at the Battle of Balaclava in 1854. The family were also distinguished lawyers, and David Ainslie of Costerton, who died in 1900, left a fortune amassed from his legal practice to build the Astley Ainslie Hospital in Edinburgh. There is a memorial to the Ainslie family on the wall of the parish church.