He was born in Glasgow of an old Scottish family who held lands in Ayrshire and whose Fairlie Castle overlooked the Clyde near the village of Fairlie. His ancestors included farmers, tradesmen, and artisans at Bannockburn, Balfron, Killearn, and Glasgow.
He was the second of five children and the first of three sons of James Mitchell Fairlie and Margaret Simpson (Miller) Fairlie. James Fairlie was a chemist (druggist) who left Glasgow in 1879 after the failure of a venture in soft-drink syrup manufacturing.
He worked in New York City for two years and then opened a drugstore in Jacksonville, Florida, where he established his family when John was nine. Husband and wife were overwhelmed in relief efforts during the yellow fever epidemic of 1888 and both died that year.
The elder sister, Margaret, held the survivors together, and John worked as a shorthand typist for Jacksonville officials.