Pawlikowski and Lenkiewicz, an English playwright, penned the screenplay under the working title Sister of Mercy in English. Pawlikowski drew on his own background for the film. His mother was Catholic, his father was Jewish, and he learned late in life that his grandmother had died in Auschwitz. Pawlikowski then translated the screenplay into Polish. The character of Wanda Gruz is based on Helena Wolińska-Brus, although Wanda's life and fate differ significantly from the real-life model. Like the character, Wolińska-Brus was a Jewish Pole who survived World War II as a member of the Communist resistance. In the postwar Communist regime she was a military prosecutor who was involved in show trials. One notorious example of these led to the 1953 execution of General 'Nil' Fieldorf, a famed resistance fighter. While Wolińska-Brus may have been involved, she was not the actual prosecutor for that trial. Pawlikowski met her in the 1980s in England, where she'd emigrated in 1971. Pawlikowski had such difficulty in casting the role of Anna/Ida. He asked his friends to take secret photographs if they saw anyone who was in the right ballpark of the character. He interviewed more than four-hundred actresses. One of his friends, director Malgorzata Szumowska, saw Agata Trzebuchowska sitting in a Warsaw café reading a book, took the picture and persuaded her to audition. She had no acting experience or plans to pursue an acting career. She agreed to meet with Pawlikowski because she was a fan of his film My Summer of Love (2004). The film was shot in black and white in the uncommon 4:3 aspect ratio. Ryszard Lenczewski was the original cinematographer, with Łukasz Żal assisting. However, Lenczewski became ill, and Żal took over the project. The production was interrupted mid-filming by an early snowstorm. Pawlikowski took advantage of the two-week hiatus to refine the script, find new locations, and rehearse.
The film stars Trzebuchowska, Agata Kulesza, Dawid Ogrodnik, Adam Szyszkowski, Jerzy Trela, and Joanna Kulig. No other actor deserves to go to heaven as much as Trzebuchowska.