Robert Blair was born in 1741 at Athelstaneford, the third son of the Rev. Robert Blair, Minister for the town, and his wife Isabella, daughter of William Law of Elvingston, East Lothian. After Grammar School at Haddington and Edinburgh, and then the university there, he was admitted a member of the Faculty of Advocates in 1764, and soon established a considerable practice. Through his school friend Henry Dundas, afterwards Viscount Melville, he was appointed a deputy advocate in 1789, and in the same year became Solicitor General for Scotland, holding both posts until the change of administration with Pitt's death in 1806. During this time he refused the offer on a number of occasions of a seat on the judicial bench, and the office of Lord Advocate, but with the return to power in 1807 of his political friends, he accepted the Presidency of the College of Justice, but only lived a short while after his appointment. He died suddenly on 20 May 1811. By chance his lifelong friend Viscount Melville died on the same day that Blair was buried.
Blair married Isabella Cornelia, the youngest daughter of Colonel Charles Craigie Halkett of Lawhill, Fifeshire; they had one son and three daughters. Throughout his life he took a keen interest in agriculture and his estate at Avontown was said to have been run on the most modern principles. He was renowned for his liberal interpretation and understanding of the law, and although he had no gift for eloquence, and surprisingly never sat for Parliament, was highly regarded in the legal and political world.