 He was educated at Edinburgh Academy and the University of Edinburgh.Shaw joined the Navy as an assistant surgeon in 1854, rising to Inspector-General of Hospitals and Fleets on 7 May 1888.He retired in 1892.