Introduction: Insulin-like peptides (Ilps) play crucial roles in nearly all life stages of insects. Ilp8 is involved in developmental stability, stress resistance and female fecundity in several insect species, but the underlying mechanisms are not fully understood. Here we report the functional characterization of Ilp8s in three fly species, including Bactrocera dorsalis, Drosophila mercatorum and Drosophila melanogaster. Methods: Phylogenetic analyses were performed to identify and characterize insect Ilp8s. The amino acid sequences of fly Ilp8s were aligned and the three-dimensional structures of fly Ilp8s were constructed and compared. The tissue specific expression pattern of fly Ilp8s were examined by qRT-PCR. In Bactrocera dorsalis and Drosophila mercatorum, dsRNAs were injected into virgin females to inhibit the expression of Ilp8 and the impacts on female fecundity were examined. In Drosophila melanogaster, the female fecundity of Ilp8 loss-of-function mutant was compared with wild type control flies. The mutant fruit fly strain was also used for sexual behavioral analysis and transcriptomic analysis. Results: Orthologs of Ilp8s are found in major groups of insects except for the lepidopterans and coleopterans, and Ilp8s are found to be well separated from other Ilps in three fly species. The key motif and the predicted three-dimensional structure of fly Ilp8s are well conserved. Ilp8 are specifically expressed in the ovary and are essential for female fecundity in three fly species. Behavior analysis demonstrates that Ilp8 mutation impairs female sexual attractiveness in fruit fly, which results in decreased mating success and is likely the cause of fecundity reduction. Further transcriptomic analysis indicates that Ilp8 might influence metabolism, immune activity, oocyte development as well as hormone homeostasis to collectively regulate female fecundity in the fruit fly. Discussion: Our findings support a universal role of insect Ilp8 in female fecundity, and also provide novel clues for understanding the modes of action of Ilp8.