He studied Medicine at Glasgow University under Prof George Arnott Walker-Arnott receiving his doctorate (MD) in 1853. He then sat the exam for the Indian Medical Service, passing, and going to Bengal in 1856 as an assistant surgeon. In 1857 he was present at the Siege of Delhi, one of the decisive points in the Indian Mutiny. In 1858 he joined the expedition to Yusufzai and served some time with the Punjab regiments. In 1860 he left his medical duties to become Superintendent of the Botanic Gardens at Saharunpore under the jurisdiction of Dr William Jameson, delegating for him during a year of absence. He also had duties overseeing the government tea plantations in the region.