Andy and Red's opening chat in the prison yard, in which Red is throwing a baseball, took nine hours to shoot because director Frank Darabont insisted on many takes of the scene before he was satisfied. Morgan Freeman threw the baseball for the entire nine hours without a word of complaint. He showed up for work the next day with his left arm in a sling.
Morgan Freeman said that this was "an absolutely delightful script", certainly among the top best scripts he had ever read. He contacted his agent and said, "It doesn't matter which part it is - I want to be in it." He was then surprised to learn that they wanted him to play Red: "And I thought, 'Wow, I control the movie!' I was flabbergasted by that." The finished film is his favorite movie of his own.
Clint Eastwood, Harrison Ford, Paul Newman, Gene Hackman, Robert Redford and Robert Duvall were all considered for the part of Red, who was a middle-aged white Irishman with graying red hair in the novel. However, none of these actors would commit for various reasons. Redford may have been busy directing Quiz Show (1994), which would later compete with Shawshank at the box office and at the Oscar ceremony, both being nominated for Best Picture and Adapted Screenplay (neither won). It was Castle Rock producer Liz Glotzer who ignored the racial specification and suggested Morgan Freeman to Frank Darabont for the role, because of his authoritative presence, demeanor, and deep voice. Red's reply, "Maybe it's because I'm Irish," to Andy's inquiry about his nickname was kept in the film as a joke.
Stephen King never cashed his $5,000 check for rights to the film. Several years after the movie came out, King got the check framed, and mailed it back to Frank Darabont with a note inscribed, "In case you ever need bail money. Love, Steve."
To prepare for his role as Andy Dufresne, Tim Robbins actually spent some time in solitary confinement. He asked to be locked in solitary for a while to get a feel for it, although he knew his experience wouldn't be the same because it was voluntary.
Frank Darabont: [old movie clips] The inmates are seen watching Gilda (1946). In the original novella, the prisoners watched The Lost Weekend (1945). Because the rights to the latter were owned by a different studio, Darabont looked to see which old films he could show without incurring costs. He was delighted to see that one that he was able to use was Gilda, one of the greatest hits of Rita Hayworth, whose image plays a pivotal role in the story.
Frank Darabont: [Libby] Darabont always tried to cast Brian Libby in his films, and he appears in this film as Floyd.
Frank Darabont: [Heywood Floyd] Heywood and Floyd are the names of two Shawshank inmates. Heywood Floyd is a NASA administrator in books written by Sir Arthur C. Clarke, including 2001: A Space Odyssey, and 2010: Odyssey Two.