He was born in Bonhill, Dumbartonshire, Scotland in 1830, the son of James Nairn, and was educated there. In 1850, he came to Saint John, New Brunswick, moving to Aylmer, Canada West one year later. Nairn worked as a bookkeeper there, later becoming a general merchant and grain dealer and then a notary public. He married Delphine Van Patter in 1854. Nairn served 21 years on the council for Malahide Township and eight years on the council for Elgin County; he was county warden from 1866 to 1871. He served as a director on the board for the Canada Southern and Canada Air Line Railways. Nairn ran unsuccessfully in East Elgin in 1867 but then was elected in 1879. He was defeated by Charles Oaks Ermatinger in the 1883 general election but was elected again in 1886.
He died in office in 1888.