wilson was born in edinburgh on 30 september 1852 the son of francis wilson and margaret wilson, nee spears (1810-1883). he appears to have been the great nephew of the edinburgh zoologist james wilson. he was educated at dollar academy then the royal high school, edinburgh. he studied science and medicine at the university of edinburgh, graduating with an mb around 1872.