The vertebrate nuclear hormone receptor steroidogenic factor 1 (SF1; NR5A1) controls reproductive development and regulates the transcription of steroid-modifying cytochrome P450 genes. We find that the SF1-related Drosophila nuclear hormone receptor HR39 is also essential for sexual development. In Hr39 mutant females, the sperm-storing spermathecae and glandular parovaria are absent or defective, causing sterility. Our results indicate that spermathecae and parovaria secrete reproductive tract proteins required for sperm maturation and function, like the mammalian epididymis and female reproductive tract. Hr39 controls the expression of specific cytochrome P450 genes and is required in females both to activate spermathecal secretion and repress male-specific courtship genes such as takeout. Thus, a pathway that, in vertebrates, controls sex-specific steroid hormone production, also mediates reproductive functions in an invertebrate. Our findings suggest that Drosophila can be used to model more aspects of mammalian reproductive biology than previously believed.