Nairn was born on 17 March 1879 in Alberton, Victoria. He was the third of four children born to Margaret (née Merritt) and William Nairn. His father, born in Scotland, died in 1890, placing the family into financial hardship.[1]
In 1909, Nairn was admitted to the bar and joined the firm of Penny, Hill and Nairn as a partner. He was elected to the North Perth Municipal Council in the same year. In 1921 he went into partnership with Grant McDonald, the brother of Ross McDonald. Nairn's practice thrived through his political connections. In 1917 he represented Frank Wilson's government as junior counsel at the royal commission into the Nevanas affair. In 1924 he was appointed by James Mitchell as royal commissioner into the collapse of the Gosnells Estate Company. In 1927 he defended police officers connected with the Forrest River massacre.[1]
Nairn was elected to the House of Representatives at the 1929 federal election as a Nationalist in the seat of Perth, defeating incumbent and dissident former Nationalist member Edward Mann who had renominated as an independent. He was "committed to the Nationalist platform of sound finance and rationalisation of the arbitration system" and promised to resist further tariff increases.[1] He served on the public works committee and as deputy chairman of committees, and was re-elected in 1931, 1934, 1937 and 1940.[4]
Nairn was elected Speaker of the House after the 1940 election, unexpectedly winning a heavily contested partyroom ballot for the government nominee to succeed George John Bell, who had stepped down following the election.[5][6] He remained Speaker after the Menzies minority government was defeated in parliament and replaced by the Curtin Labor government, but resigned prior to the 1943 election to allow him to vote on a no-confidence motion. He lost his seat to Labor candidate Tom Burke at the election.[7][8][9]
In 1902, Nairn married Philomena Boladeras. He was widowed in 1904 and in 1905 remarried to Mary Bertram. They had three children, although their first child died in infancy.[1]
^ ab"Mr. W. M. Nairn". The Telegraph. No. 17, 743. Queensland. 16 October 1929. p. 5. Retrieved 17 January 2017 – via National Library of Australia.
^"ON THE FRONT PAGE". Western Mail. Vol. XLVII, no. 2, 414. Western Australia. 19 May 1932. p. 5. Retrieved 17 January 2017 – via National Library of Australia.
^"The New Speaker". Kalgoorlie Miner. Vol. 46, no. 11, 983. Western Australia. 21 November 1940. p. 4. Retrieved 17 January 2017 – via National Library of Australia.
^"FEDERAL SPEAKER". Queensland Times. No. 16846. Queensland. 20 November 1940. p. 4 (DAILY.). Retrieved 17 January 2017 – via National Library of Australia.
^"Interest In New Speaker". The Mercury. Vol. CLII, no. 21, 805. Tasmania. 16 October 1940. p. 1. Retrieved 17 January 2017 – via National Library of Australia.