In 1947 Portland, Maine, banker Andy Dufresne is convicted of murdering his wife and her lover, and is sentenced to two consecutive life sentences at the Shawshank State Penitentiary. Andy is befriended by contraband smuggler, Ellis “Red” Redding, an inmate serving a life sentence. Red procures a rock hammer and later a large poster of Rita Hayworth for Andy. Working in the prison laundry, Andy is regularly assaulted by “the Sisters” and their leader, Bogs.
In 1949, Andy overhears the captain of the guards, Byron Hadley, complaining about being taxed on an inheritance, and offers to help him legally shelter the money. After an assault by the Sisters nearly kills Andy, Hadley beats Bogs severely. Bogs is then transferred to another prison. Warden Samuel Norton meets Andy and reassigns him to the prison library to assist elderly inmate Brooks Hatlen. Andy’s new job is a pretext for him to begin managing financial matters for the prison employees. As time passes, the Warden begins using Andy to handle matters for a variety of people, including guards from other prisons and the warden himself. Andy begins writing weekly letters asking the state government for funds to improve the decaying library.
In 1954, Brooks is paroled, but cannot adjust to the outside world after fifty years in prison, and commits suicide by hanging himself. Andy receives a library donation that includes a recording of The Marriage of Figaro. He plays an excerpt over the public address system, resulting in him receiving solitary confinement. After his release from solitary, Andy explains that hope is what gets him through his time, a concept that Red dismisses. In 1963, Norton begins exploiting prison labor for public works, profiting by undercutting skilled labor costs and receiving bribes. He has Andy launder the money using the alias Randall Stephens.
In 1965, Tommy Williams is incarcerated for burglary. He is befriended by Andy and Red, and Andy helps him pass his GED exam. In 1966, Tommy reveals to Red and Andy that an inmate at another prison claimed responsibility for the murders for which Andy was convicted. Andy approaches Norton with this information, but he refuses to listen and sends Andy back to solitary confinement when he mentions the money laundering. Norton has Hadley murder Tommy under the guise of an escape attempt. Andy declines to continue the laundering, but relents after Norton threatens to burn the library, remove Andy’s protection from the guards, and move him to worse conditions. Andy is released from solitary confinement after two months, and tells Red of his dream of living in Zihuatanejo, a Mexican coastal town. Red feels Andy is being unrealistic, but promises Andy that if he is ever released, he will visit a specific hayfield near Buxton, Maine, and retrieve a package Andy buried there. He worries about Andy’s well-being, especially when he learns Andy asked another inmate to supply him with six feet (1.8 meters) of rope.