He represented Elgin East in the Legislative Assembly of Ontario from 1879 to 1883 and from 1886 to 1888 as a Liberal member.
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.
Nairn ran unsuccessfully in East Elgin in 1867 but then was elected in 1879.