Andy helped ex-German soldier Kurt Dussander forge documents to allow entry to the United States.
A year later, in 1947 Andy was charged with the double murder of his wife and the man she was cheating with. He received 2 life sentences for the double murders; although, Andy insisted he did not commit this crime.
Before his incarceration, Andy was the vice president of a big bank which Red said was good work for such a young man. The night he arrived at Shawshank, Red made a bet that Andy would be the first one to break down crying, but Andy did not make a sound.
The first two years were really harsh on Andy. He was targetted by the sisters, 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 labour 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 at 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 over the loud speakers so the entire prison can 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 early 1960's, 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 took a liking to him soon after he arrived. Soon he was a part of their gang. Tommy wanted to try for his GED so Andy helped him. When he took his test he thought he had failed and had a breakdown. Andy sent in the test anyway, and Tommy 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, Elmo 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, so 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 realised that the warden was never going to let him leave Shawshank State Penitentiary.
In 1966, Andy escaped from Shawshank Prison. He spent 19 years tunneling through the wall of his cell with his Rock Hammer , his hole covered by his 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 leagur. He procured a 6-foot length rope, and tied a plastic bag filled with records and books.
He crawled through the tunnel. After that he attempted 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. He crawled through 500 yards of sewage, coming out into a river. He ripped off his inmate clothing, basking in his freedom.
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.
He later crossed into Mexico at Fort Hancock , before settling down in Zihuatanejo, Mexico, on the beach while he stared into the horizon. After a few years, Red got released from prison and joined Andy.
A prominent feature of his temperament is his introverted nature. Most of the time, Andy tends to be soft spoken and quiet. When he escapes, he is triumphant. The details of his escape plan showed his determination and intelligence. In the end, his patience and hard work paid off.