PIWI-interacting RNA (piRNA) pathways control transposable elements (TEs) and endogenous genes, playing important roles in animal gamete formation. However, the underlying piRNA biogenesis mechanisms remain elusive. Here, we show that endogenous protein coding sequences (CDSs), which are normally used for translation, serve as origins of noncoding piRNA biogenesis in
Drosophila melanogaster
testes. The product, namely, CDS-piRNAs, formed silencing complexes with Aubergine (Aub) in germ cells. Proximity proteome and functional analyses show that CDS-piRNAs and cluster/TE-piRNAs are distinct species occupying Aub, the former loading selectively relies on chaperone Cyclophilin 40. Moreover, Argonaute 2 (Ago2) and Dicer-2 activities were found critical for CDS-piRNA production. We provide evidence that Ago2-bound short interfering RNAs (siRNAs) and microRNAs (miRNAs) specify precursors to be processed into piRNAs. We further demonstrate that Aub is crucial in spermatid differentiation, regulating chromatins through mRNA cleavage. Collectively, our data illustrate a unique strategy used by male germ line, expanding piRNA repertoire for silencing of endogenous genes during spermatogenesis.