Affinity is set in 1874, in and around the women's prison at Millbank in Victorian London. Margaret Prior, a grieving upper class woman, becomes a "Lady Visitor" at Millbank, hoping to escape her troubles and be a guiding figure in the lives of the female prisoners. Of all the inmates, she is most fascinated by the mysterious Selina, whom the other women call a spirit medium.