Spermatogenesis is a critical part of reproduction in insects; however, its molecular mechanism is still largely unknown. In this study, we identified a testis‐specific gene CG3526 in Drosophila melanogaster. Bioinformatics analysis showed that CG3526 contains a zinc binding domain and 2 C2H2 type zinc fingers, and it is clustered to the vertebrate really interesting new gene (RING) family E3 ubiquitin‐protein ligases. When CG3526 was knocked down by RNA interference (RNAi), the testis became much smaller in size, and the apical tip exhibited a sharp and thin end instead of the blunt and round shape in the control testis. More importantly, compared to the control flies, only a few mature sperm were present in the seminal vesicle of C587‐Gal4 > CG3526 RNAi flies. Immunofluorescence staining of the testis from CG3526 RNAi flies showed that the homeostasis of testis stem cell niche was disrupted, cell distribution in the apical tip was scattered, and the process of spermatogenesis was not completed. Furthermore, we found that the phenotype of CG3526 RNAi flies’ testis was similar to that of testis of Stat92E RNAi flies, the expression level of CG3526 was significantly downregulated in the Stat92EF06346 mutant flies, and the promoter activity of CG3526 was upregulated by STAT92E. Taken together, our results indicated that CG3526 is a downstream effector gene in the JAK‐STAT signaling pathway that plays a key role in the spermatogenesis of Drosophila.