While investigating a poisoner at Edinburgh Zoo, Detective Inspector John Rebus sees Darren Rough, a known paedophile, seemingly photographing children and decides to 'out' the man, in spite of assurances that he wants to reform.
Meanwhile, Rebus has been assigned to keep a watch on Cary Oakes, a convicted killer back from the US who, having served his time in prison, has come to Edinburgh to settle accounts from his past.
His experience with both Rough and Oakes makes Rebus think out his prejudices and question how much a person is the product of his inherited nature, and how much nurture shapes that character.
Rebus also has to face up to his own past and the route he took to escape it when his friend Brian Mee and former girlfriend Janice approach him to help find their son Damon, who has gone missing.
His search for answers to all his questions involves him in discovering how implicated a respected doctor had been in protecting two paedophiles then on trial for conspiring to abuse children in care homes.