Flora MacDonald Mayor was born on 20 October 1872, at Kingston Hill, Surrey.
Her father, Joseph Bickersteth Mayor (1828–1916), was an Anglican clergyman and professor of classics and then of moral philosophy at King's College London.
Flora was educated at Surbiton High School and read history at Newnham College, Cambridge.
Her first book was a collection of short stories, Mrs Hammond's Children, published in 1901 under the pseudonym Mary Strafford.
In 1903 she became engaged to a young architect, Ernest Shepherd, who died in India of typhoid before Mayor was able to travel out to join him.