William Nairne was the son of Sir William Nairne (d. 1754), 2nd Baronet of Dunsinane, and Emilia Graham (d. 1767).
He was admitted advocate in 1755, and in 1758 was appointed Conjunct Commissary-Clerk of Edinburgh. Sometime Sheriff-Depute of Perthshire. Appointed to the Court of Session in 1786 as Lord Dunsinnan. 5th Bart of Dunsinnan (1790). He eventually became Lord Commissioner of the High Court of Justiciary. Member of The Poker Club.
"He was a man of scrupulous integrity. When sheriff depute of Perthshire, he
found upon reflection, that he had decided a poor man's case erroneously; and as
the only remedy, supplied the litigant privately with money to carry the suit to
the supreme court, where his judgment was reversed."1
On November 4, 1762, having spent the evening with Nairne, George Dempster and others, Boswell describes him as "an honest upright fellow; somewhat stiff in his manner, but not without parts in a moderate degree". They met a few times more before Boswell left for London on November 15, 1762 - it seems clear, that they were already on good footing at the time. In 1763 we hear of Nairne when he accompanies Dr Hugh Blair and Boswell to Covent Garden in London. On June 1, 1764, Boswell and Nairne met at The Hague, during a visit to Holland by Nairne and Andrew Stuart in connection with the Douglas cause. Boswell on this occasion referred to Nairne as "just the old man, quiet, sensible, worthy".
Nairne later became one of Boswell's closest professional associates, and in the evening of August 15, 1773, Boswell introduced him to Dr Johnson when they supped together with John Hamilton of Sundrum and probably also with William Scott. A few days later, Nairne accompanied Boswell and Johnson on the first day of their tour, and Johnson, in his Journey to the Western Isles, wrote of him that they were "accompanied [...] by another gentleman, who could stay with us only long enough to shew us how much we lost at separation."