The daughter of Francis W. Wilson, a clerk, and his wife, Margaret Oliphant, she was born at Wallyford, 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. The connection was to last for her lifetime, during which she contributed well over 100 articles, including a critique of the character of Arthur Dimmesdale in Nathaniel Hawthorne's The Scarlet Letter.