Male-derived Sex-peptide (SP) elicits egg laying and rejection of courting males in mated Drosophila females. Little is known about the genes that specify the underlying neuronal circuits and mediate this switch in female sexual behavior.Here we show that the egghead gene involved in glycosphingolipid biosynthesis provides an essential component to the SP response. We have isolated viable alleles of the vital egghead gene that abolish egghead expression from a distal promoter resulting in the absence of the largest transcript of this complex transcription unit. Temporally and spatially restricted expression of egghead revealed a requirement for egghead early in the development of apterous-expressing ventral nerve cord neurons to rescue the SP response. In viable egghead alleles, these ascending interneurons, three per abdominal and seven per thoracic hemisegment, fail to innervate the central brain. egghead expression in apterous neurons rescues neuronal targeting and the response to SP. Furthermore, neurotransmission in apterous neurons is required to elicit the SP response.Together with the former finding of SP binding to afferent nerves , these results suggest that SP-mediated modification of sensory input switches female sexual behavior from the virgin to the mated state.