Mating in many species induces a dramatic switch in female reproductive behaviour. In most insects, this switch is triggered by factors present in the male’s seminal fluid. How these factors exert such profound effects in females is unknown. Here we identify a receptor for the Drosophila melanogaster sex peptide (SP, also known as Acp70A), the primary trigger of post-mating responses in this species. Females that lack the sex peptide receptor (SPR, also known as CG16752), either entirely or only in the nervous system, fail to respond to SP and continue to show virgin behaviours even after mating. SPR is expressed in the female’s reproductive tract and central nervous system. The behavioural functions of SPR map to the subset of neurons that also express the fruitless gene, a key determinant of sex-specific reproductive behaviour. SPR is highly conserved across insects, opening up the prospect of new strategies to control the reproductive and host-seeking behaviours of agricultural pests and human disease vectors.