William Hurt's character, Phillip Allen, is partly based on Allen Dulles, OSS operative and later CIA director during the Bay of Pigs invasion. Contrary to common belief President Kennedy was fascinated with the world of espionage and unconventional warfare, granting the US Special Forces their trademark Green Berets whilst his enthusiasm for the James Bond novels helped to popularize them. However during the CIA's Pay of Pigs operation he refused to allow overt military support for the mission and severely limited the number of air strikes allowed to be flown by the CIA's own aircraft for fear of revealing the US government's role. Both decisions are widely considered to have doomed the entire enterprise to failure from the start. Ironically, Allan Dulles was appointed to the Warren Commission investigating the assassination of President Kennedy, Dulles' former boss. Kennedy had fired Allan Dulles as head of the CIA.
Joe Pesci appears in one scene as a Mafia boss ("Joseph Palmi") whom, it is implied in the film, is a fictionalized version of Sam Giancana (in one scene it is mentioned that Fidel Castro has seized "three of [Palmi's] casinos and thrown him out of [Cuba]"; in fact, Castro did "nationalize" several Giancana-controlled casinos). The CIA recruited Giancana for several assassination attempts on Castro.
Michael Gambon's character, Dr. Fredricks, is partly inspired by Alan Turing, a British mathematician who helped to crack the German "Enigma" code during World War II, and who is considered one of the founders of modern computer science. In 1952, Turing was expelled from the British secret service after being prosecuted for his homosexual affairs. In 1954, he died after eating a cyanide-laced apple, but it is unknown if he was murdered or committed suicide.
Robert De Niro had a deal with Leonardo DiCaprio who was interested in playing the film's protagonist Edward Wilson. De Niro planned to shoot the movie in the fall of 2004 but DiCaprio couldn't do it then because he was making The Departed (2006) for Martin Scorsese. The role ultimately went to Matt Damon, who played DiCaprio's antagonist in The Departed. Both movies were nominated for Oscars in 2007.
Two references to "Cardinal" are made in the movie, once in the beginning when the comment that "Cardinal is interested" is made by Ray Brocco and once at the end when Edward Wilson says that "it's a cardinal rule to be generous in a democracy". "Cardinal" was the code name of a high level American spy in the Soviet Union in Tom Clancy's novel The Cardinal in the Kremlin.
Eric Roth penned the screenplay in 1994 for Francis Ford Coppola and Columbia Pictures. Coppola left the project because, he said, he could not relate to the characters finding them "unemotional", (although he retained a credit as co-executive producer).
Wayne Wang was set to direct but management changes at Columbia ended Wang's involvement and Philip Kaufman was the next person set to direct but he eventually left the project. When it moved to MGM, John Frankenheimer signed on to make the movie and wanted Robert De Niro to star. Unfortunately, Frankenheimer died in 2002 and at the same time De Niro was developing his own spy story.
Matt Damon specifically noted that this film, along with "Syriana", was a risky and hard-hitting project that he was able to do in the wake of massive success for his first two Jason Bourne films ("The Bourne Identity" and "The Bourne Supremacy").
The trivia items below may give away important plot points.
Billy Crudup's character, Archy Cummings, is partly based on real life British traitor Kim Philby, who attended Cambridge University, rose through the ranks of British Intelligence, and subsequently was discovered to be a Soviet spy. He later fled to Moscow, where he lived out the rest of his life. The movie reflects this, having Wilson speaking by phone to Cummings who is in the Soviet Union.
They give the "real" Valentin liquid LSD which causes him to go crazy ultimately restating that he is, indeed, Valentin Mironov, before committing suicide by jumping through the glass window. This is a reference to an actual event wherein Frank Olson, a US Army scientist, died in a similar way in 1953, allegedly as a result of his unwitting participation in LSD experiments which were part of the CIA's 'MKULTRA'-program.