Preterm birth affects ~10% of pregnancies in the US. Despite familial associations, identifying at-risk genetic loci has been challenging. We built deep learning and graphical models to score mutational effects at base resolution via integrating the pregnant myometrial epigenome and large-scale patient genomes with spontaneous preterm birth (sPTB) from European and African American cohorts. We uncovered previously unidentified sPTB genes that are involved in myometrial muscle relaxation and inflammatory responses and that are regulated by the progesterone receptor near labor onset. We studied genomic variants in these genes in our recruited pregnant women administered progestin prophylaxis. We observed that mutation burden in these genes was predictive of responses to progestin treatment for preterm birth. To advance therapeutic development, we screened ~4000 compounds, identified candidate molecules that affect our identified genes, and experimentally validated their therapeutic effects on regulating labor. Together, our integrative approach revealed the druggable genome in preterm birth and provided a generalizable framework for studying complex diseases.