Andrew "Andy" Dufresne is the main protagonist in Stephen King's Rita Hayworth and Shawshank Redemption and the 1994 film adaptation. Andy is sentenced to two life sentences for the murder of his wife and her lover, a crime he truly did not commit.
Andy was the vice president of a bank in Portland, Maine. Despite being young, he was very successful. He married his wife Linda presumably in the late 1930s, after proposing to her in a hayfield in Buxton. In early 1947, Linda started taking golf classes with tutor Glen Quentin. They soon started an affair. Andy confronted her and she denied his allegations. Later that night she went to Glen's house where Andy arrived in a state of inebriation. He left his revolver with 4 bullets missing near the scene. After Andy left without committing any crime, Elmo Blatch entered the house and killed them both. Andy was wrongfully charged with the double murder his wife and the man she was cheating with. He received two life sentences for the double murders despite maintaining his innocence.
The first two years were harsh on Andy. He was targeted by the Sisters, a gang of prison rapists, and originally ignored by many of the inmates. Over time though he built up a friendship with Red, though his harassment by the Sisters continued. Eventually, however, Andy was able to use his skills to turn his life around.
Andy was able to help the warden and the prison staff because of his knowledge of finances and tax law. As a result, he was exempt from manual labor and harassment by his fellow inmates, (Captain Hadley even beat up the lead sister Bogs following an assault which left Andy in the infirmary for a month). Taking on a position in the library, Andy wrote letters to the state for six years asking for books and funds to help build a prison library. After he succeeded in getting funds for the library, he was thrown in The Hole for playing Duettino Sull'aria a piece of opera music over the loudspeakers for the entire prison to hear.
Even so, Andy was not deterred. He continued to send letters until the state finally relented and sent him an annual fund of $500 "just to shut him up."
Throughout the 1950s and early 1960s, Andy built the Brooks Hatlen Memorial Library. By 1963, he had built the finest prison library in all of New England. The same year, the Warden started his new public service program where the prisoners would work outside the walls. In reality, it was simply a way for the Warden to make money from the cheap labor of the inmates. Andy, using an entity named Randall Stephens, laundered the Warden's illicit profit.
In 1965 Tommy Williams arrived at Shawshank and Andy and his friends soon took a liking to him. He quickly became a part of their gang. Tommy wanted to try for his GED so Andy helped him. Yet when he took his test he thought he had failed and had a breakdown. Andy sent in the test anyway, and Tommy ultimately passed with a C+ average.
Following a conversation with Red about Andy, Tommy came to a horrible revelation. He told Red and Andy he knew who really killed Andy's wife and her lover. It was his former cellmate at another prison, Elwood Blatch. Andy went to the warden and told him about the new evidence. The Warden didn't want to let Andy get a new trial and leave Shawshank, because Andy was laundering money. After Andy called him obtuse, he sent Andy to the hole. During Andy's stay in the hole, Tommy was murdered by the Warden and Captain Hadley. Once his original stint in the hole was done, Andy was blackmailed by the Warden and given another month to think about his options.
It was at this moment that Andy realized that the Warden was never going to let him leave Shawshank State Penitentiary.
Andy Dufresne's Escape
In 1966, Andy escaped from Shawshank Prison. He had spent 18 years tunneling through the wall of his cell with his Rock Hammer, his hole covered by his posters of Rita Hayworth, later Marilyn Monroe, and a final poster of Raquel Welch. After Tommy was shot by Hadley under the command of Norton because he knew information that could support Andy's innocence, Andy decided he had been there long enough. He waited for a stormy night, whereupon he took the warden's shoes, and one of his suits, whilst hiding his rock hammer in the bible he had been issued upon his arrival, which he swapped for the Warden's ledger. He procured a 6-foot length rope from Heywood and tied a plastic bag filled with the records and books as well as a bar of soap and the stolen suit with his chess pieces made from carved rocks.
He crawled through his makeshift cell tunnel. After that he managed to bust a pipe open in unison with the thunder, to mask the sound of his blows to the pipe. After three attempts, the pipe burst and opened. Andy crawled through 500 yards of sewage, coming out into a river. After a meal of cold corn and refuse from his hair, he ripped off his inmate clothing, basking in his freedom, Andy then used the bar of soap to clean himself in the river before changing into his stolen suit.
The next day, Andy walked into the Bank of Portland and nearly a dozen other banks. Posing as Randall Stephens, he withdrew more than $370,000 of the Warden's money ("severance pay for 19 years"). He also mailed the evidence of their financial crimes to the Daily Bugle, presumably along with evidence of his own innocence. When the story was published, Captain Hadley was arrested and Warden Norton committed suicide to avoid arrest for his crimes.
Red got released from prison a few months later and reunited with Andy.