The daughter of Francis W. Wilson (c.1788–1858), a clerk, and his wife, Margaret Oliphant (c.1789–1854), 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 whole 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.
In May 1852, she married her cousin, Frank Wilson Oliphant, at Birkenhead, and settled at Harrington Square in London. An artist working mainly in stained glass, her husband had delicate health, and three of their six children died in infancy, while the father himself developed alarming symptoms of consumption. For the sake of his health they moved in January 1859 to Florence, and then to Rome, where Frank Oliphant died. His wife, left almost entirely without resources, returned to England and took up the burden of supporting her three remaining children by her own literary activity.
She had now become a popular writer, and worked with amazing industry to sustain her position. Unfortunately, her home life was full of sorrow and disappointment. In January 1864 her only remaining daughter Maggie died in Rome, and was buried in her father's grave. Her brother, who had emigrated to Canada, was shortly afterwards involved in financial ruin, and Mrs. Oliphant offered a home to him and his children, and added their support to her already heavy responsibilities.