Blake Lively was originally cast in the lead role but the production company that was funding the movie dropped out after learning of her casting only to return after Rooney Mara took over the role from Lively.
Jude Law admitted that he felt insecure as an actor playing the lead role, as it was his first performance in which he was playing a husband and father, as he is in real life, and his first role where he used his normal accent and did not have any hair or makeup change.
Steven Soderbergh considered casting Lindsay Lohan for the role of Emily and he auditioned her three times. However, producers felt that her ongoing legal issues would disrupt the production process. Rooney Mara was eventually cast for the part.