The daughter of Francis W. Wilson (c.1788–1858), a clerk, and his wife, Margaret Oliphant (c.1789–1854), she was born atWallyford, near Musselburgh, East Lothian, and spent her childhood at Lasswade (near Dalkeith), Glasgow and Liverpool. As a girl, she constantly experimented with writing. In 1849 she had her first novel published: Passages in the Life of Mrs. Margaret Maitland. This dealt with the Scottish Free Church movement, with which Mr. and Mrs. Wilson both sympathised, and met with some success. It was followed by Caleb Field in 1851, the year in which she met the publisher William Blackwood in Edinburgh and was invited to contribute to the famous Blackwood's Magazine.