MacPherson served in the China War of 1841 and was appointed Staff Officer to the Artillery in the Straits in 1843. He succeeded Colonel H. Man as Executive Engineer and Superintendent of Convicts and Resident Councillor, Malacca in 1855 and 1857 respectively. He had been active in forming a local volunteer corps at the outbreak of the Crimean War and was appointed First Captain Commandment of the Singapore Volunteer Rifle Corps formed in 1854. When the first Municipal Act came into operation in 1856, he became an ex officio member of the Commission, becoming President on three later occasions. He was appointed the first Colonial Secretary when the Straits Settlements became a Crown Colony in 1867.