Neilson chose a career in the military. He joined the Cameronians (Scottish Rifles) before being commissioned into the Argyll and Sutherland Highlanders as a second lieutenant on 1 December 1897. He was promoted to lieutenant on 1 October 1899, and served in the Boer War from 1899 to 1902 taking part in the advance on Kimberley and the Battle of Modder River on 28 November 1899.