In 1947, Andy Dufresne (Tim Robbins), a banker, was convicted of murdering his wife and her lover, a golf pro. He was sentenced to two life sentences, and sent to the notoriously harsh Shawshank Prison in Maine. Andy always claimed his innocence.
During the first night, the chief guard Byron Hadley (Clancy Brown), savagely beat up a newly arrived inmate because of his crying & complaining. Meanwhile Andy kept to himself even though during the day Ellis Redding (Morgan Freeman), also known as Red, had bet against others that Andy would have been the one to break down first. That beating led to the new inmate's death.
About a month later, Andy approached Red because Red could smuggle things from outside for a fee. He asked if Red could find him a rock hammer, an instrument he claimed he needed for his hobby in rock collecting. Although other prisoners had heard Red was a "cold fish", Red saw something in Andy, and liked him from the start.
Over the first two years of doing time, Andy worked in the prison laundry. He ended up attracting attention from "the Sisters", a group of prisoners who sexually assaulted other prisoners, and was raped on a regular basis.
Red pulled some strings, and got Andy a break by getting him on a work detail tarring the roof of one of the prison's building. During the job one day, Andy overheard Hadley complaining about having to pay taxes for an upcoming inheritance. Andy approached, using his expertise as a banker to let Hadley know how he could shelter his money from the IRS. He said he would assist in exchange for some cold beers for his fellow inmates. Warden Norton heard about the help, and used a prison inspection to size him up.
Soon, after asking Red for "Rita Hayworth", he was once more encountered by the Sisters. This time, he resisted, and was brutally beaten and raped, putting him in the infirmary for a month. Boggs, the leader of the Sisters, spent a week in solitary. But when he came out, Hadley and his men were waiting in his cell. They beat him so bad he was left paralyzed, and transferred to a prison hospital, never to bother Andy again. When Andy got out of the infirmary, he found a bunch of rocks and a poster of Rita Hayworth; presents from Red and his buddies.
Andy was sent to work with Brooks Hatlen (James Whitmore), an aging inmate in the prison library, where he set up a make-shift desk to provide services to other guards including the warden with income tax returns and other financial advice. His practice became so appreciated that even guards from other prisons, when they came for inter-prison baseball matches, sought Andy's advice as well.
Warden Samuel Norton profited on Andy's knowledge of bookkeeping and devised a scheme whereby he put prison inmates to work in projects which he won by outbidding other contractors (cheap labor from the prisoners). Occasionally, he let others get some contracts if they bribed him. Andy laundered money for the warden by setting up many accounts in different banks using a fake identity: "Randall Stephens".
After 6 years of writing letters, Andy received $200 from the state for the library, along with a collection of old books and records. He put Mozart's on a turntable and channelled the music through a PA system. He turned up the volume and locked the office where the record player was to prevent interference by the warden and guards. That stunt landed Andy in solitary for a week but he seemed unfazed. With the enlarged library and more materials, Andy began to teach those inmates who wanted to receive their high school diplomas.
In 1965, a young prisoner named Tommy (Gil Bellows) came to Shawshank . One day he happened to mention that some years ago, he had a cellmate who boasted about killing a man who was a pro golfer at the country club he worked at, along with his lover. The woman's husband, a banker, had gone to prison for those murders. With this new information, Andy, full of hope, brought the matter to the warden's attention, expecting he could help him get another trial with Tommy as a witness. The reaction from Norton was the contrary of what Andy had hoped for. Fearing the end of the lucrative ill-gotten money that Andy was looking after for him, Norton had Tommy shot dead by Hadley and Andy sent to solitary confinement for 2 months.
Afterwards, Andy returned to the usual daily life at Shawshank, a seemingly broken man. One day he related a story of how he got engaged. He and his wife (then-girlfriend) went up to a farm in Buxton, Maine, to a large oak tree at the end of a stone wall. The two made love under the tree, after which he proposed to her. He told Red that, if he should ever be paroled, he should look for that field, and that oak tree. There, under a large black rock that would look out of place, Andy intended to leave a box for Red. Andy refused to reveal what might be in that box, and Red had no idea how Andy ever intended to place such a box in the first place.
One day Andy asked for rope, leading Red and his buddies to suspect he was going to commit suicide. At the end of the day, Norton asked Andy to shine his shoes for him and put his suit in for dry-cleaning before retiring for the night.
The following morning, Andy was not accounted for as usual from his cell. At the same time, Norton became alarmed when he found out Andy's shoes were in his shoebox instead of his own. He rushed to Andy's cell and demanded an explaination. Hadley brought in Red, but Red knew nothing of Andy's plans either. Getting paranoid, Norton started throwing rocks at everyone. But when he threw it at Andy's poster of Raquel Welch (where it used to hold Marilyn Monroe and Rita Hayworth before), the rock went right through and into the wall. Behind that poster was a tunnel big enough for a man to crawl through.
The previous night, it was storming. Andy wore Norton's shoes to his cell, figuring nobody would notice. He packed some papers and Norton's clothes into a plastic bag, tied it to himself with some rope, and escaped through his hole. He got down to a sewer main. Using a rock, he hit it in time with the lightning strikes and eventually burst it. He crawled 500 yards through raw sewage to a nearby river. There, he washed off and changed into the warden's clothes. All the authorities found were his prison uniform, a used bar of soap and one of his rock hammers beaten down to nearly nothing.
That morning, Andy used his assumed alias as Randall Stephens, complete with all necessary documentation, and collected a cashiers' check from the bank where he had put Warden Norton's money, nearly $250,000 worth, in Portland, Maine. Before he left, he asked them to drop a package in the mail. It was Warden Norton's books...and they went right to Portland's main newspaper.
Not long after, the police stormed Shawshank Prison. Hadley was arrested for murder; Red said he was taken away "crying like a little girl". Warden Norton finally opened the safe, which he hadn't touched since Andy escaped, and instead of his books, he found the Bible he had given Andy...which he had used to conceal his rock hammer. Norton barricaded himself in his office, then put a gun in his mouth, committing suicide.
Shortly after, Red received a postcard from Fort Hancock, Texas, with nothing written on it. Red took it as a sign that Andy made it into Mexico and was totally free. Red and his buddies would spend their time talking about Andy's exploits (with a lot of embellishments), but Red just missed his friend.
At Red's next parole hearing in 1967, he talked to the parole board about how "rehabilitated" was a made-up word, and how he regretted his actions of the past. His parole was granted this time. He went to work at a grocery store, and stayed at the same halfway house Brooks had stayed in. He frequently walked by a pawn shop, which had several guns and compasses in the window. At times he would contemplate trying to get back into prison, but he remembered the promise he had made to Andy.
One day, with a compass he bought from the pawn shop, he followed Andy's instructions, hitchhiking to Buxton and arriving at the stone wall he described. Just like Andy said, there was a large black stone. Under it was a lunch box containing a large sum of cash and instructions to find him. He said he needed somebody "who could get things" for a "project" of his.
Red violated parole and left the halfway house. He took a bus to Fort Hancock, where he crossed into Mexico. The two friends finally reunited on the beach of Zihuatanejo in the Pacific coast.