Wrongly accused of a double homicide he didn't commit, a banker named Andy Dufresne (Tim Robbins) is sent to Shawshank Prison for life. In prison he befriends Red (Morgan Freeman) who is able to smuggle things from the outside. He asked Red for a rock hammer (saying he liked geology). He later asks for a poster. After he befriends the guards by giving them financial advice, the warden (Bob Gunton) takes an interest in him. Andy builds a prison library and helps the warden do shady financial scams.
One day a newcomer named Tommy (Gil Bellows) tells Andy that in prison he talked to an inmate Ernie (Joseph Ragno) who said he killed a banker's wife and her boyfriend but that it was framed on Andy. Andy tells the warden who is skeptical. The Warden then has Tommy shot. Andy doesn't want to help the warden with his scam anymore, but the warden blackmails him into further help by threatening to destroy the library.
One morning, Andy is gone. The Guards search his cell and eventually find that he dug his way out of the wall with the hammer and hid the hole with the poster. This feat took Andy nearly 20 years. Andy then takes the money accumulated from the scam (a banker's salary for 20 years) and leaves town. The police attempt to arrest the Warden, who commits suicide. Red passes his parole board and reunites with Andy in a Pacific Mexican Town.