Internal sperm storage after mating is important for insect reproduction, because it permits delayed fertilisation, and post-copulatory mate choice in polyandrous females. The polyandry is common in many animal taxa including insects, because it increases female fitness by reducing the risk of infertility and providing opportunities for sperm competition and choice. The reproductive success of males, on the other hand, often depends upon avoidance of sperm competition by preventing mated females from copulating and receiving sperm from other male suitors. A widespread strategy used by males is the use of the male seminal fluid proteins (SFPs) that form the mating plug and alter female behaviors, for example by suppressing mating receptivity and elevating egg-laying. Under these circumstances, females are expected to evolve mechanism(s) to control exposure to the male SFPs in order to maximize fitness by balancing the positive and negative impacts of polyandry. Here, we discover that Drosophila melanogaster females eject male ejaculates 1-6 h after mating with a stereotypic behaviour, and that this is regulated by a brain neuropeptide pathway composed of diuretic hormone 44 (Dh44), and its receptor Dh44R1. We showed that suppressing Dh44 or Dh44R1 signals in the brain expedites sperm ejection, whereas enhancing Dh44 or Dh44R1 signals delays sperm ejection. This study uncovers a molecular mechanism by which females can influence sperm competition and selection, and counter actively the negative impact of polyandry.