It is not based on a true story but it is based on the Stephen King novella "Rita Hayworth and the Shawshank Redemption". There were several differences between the novella and the film, but the film was never based on anything in real life. Although, the crime that leads to Andy Dufresne's imprisonment bears many similarities to the Sam Sheppard case. Dr, Samuel Sheppard, D.O. was an American osteopathic physician involved in a famous and controversial murder trial when he was convicted of the murder of his pregnant wife, Marilyn Sheppard. Sheppard served almost a decade in prison before his 1954 conviction was overturned and declared a miscarriage of justice. In 1966, he was acquitted in a new trial.