Why did the pope Pius XI address his discourse on sexual morals, traditionally limited to priests, to the whole humanity? This and other questions find answers in the history of the encyclical "Casti connubii" (1930). Based on unpublished documents from the historical archive of the Pontifical Gregorian University, this essay traces parts of this history. It tells the origin and tries to interpret the meaning of the document. The first part of our paper summarizes the main features of the historical context of the encyclical: the alliance between the Catholic Church and Fascism on conjugal morals, the debate on the demographic campaign and the politicization of sexuality and reproduction, the modernization of the family and the feminist claims of the American birth control movement. The second part sketches its redactional history: the identity of the ghostwriter and the instructions of the pope.