BACKGROUNDThe melon fly, Zeugodacus cucurbitae Coquillett, is one of the major pests attacking Cucurbitaceae crops. Identifying critical genes or proteins regulating fertility is essential for sustainable pest control and a research hotspot in insect physiology. MicroRNAs (miRNAs) are short RNAs that do not directly participate in protein translation, but they function in posttranscriptional regulation of gene expression involved in male fertility.RESULTSWe found that miR‐927‐5p is highly expressed in the testes and investigated its function in spermatogenesis in Z. cucurbitae. Fluorescence in situ hybridization (FISH) showed miR‐927‐5p in the transformation and maturation region of the testis, and overexpression of the miR‐927‐5p reduced the number of sperms by 53%. In continuation, we predicted 12 target genes of miR‐927‐5p using bioinformatics combined with transcriptome sequencing data, and found that miR‐927‐5p targets the new gene Stalky in insects, which was validated by RT‐qPCR, RNA pull‐down, and dual luciferase reporter assays. FISH also confirmed the co‐localization of miR‐927‐5p and the transcript Stalky_1 in the testis. Moreover, silencing of Stalky_1 by RNA interference reduced the number of sperms by 32% and reduced sperm viability by 39% in physiologically mature male adults. Meanwhile, the silencing of Stalky_1 also resulted in low hatchability.CONCLUSIONOur work presents not only a new, so far unreported mechanism regulating spermatogenesis by miR‐927‐5p targeting a new unknown target, Stalky, which is providing new knowledge on the regulatory network of insect spermatogenesis, but it is also laying a foundation for the development of SIT against important tephritid fly pests.This article is protected by copyright. All rights reserved.