PIWI-interacting RNAs (piRNAs) repress transposons to protect the germline genome from DNA damage caused by transposon transposition. In Drosophila, the Traffic jam (Tj) mRNA is consumed to produce piRNA in its 3′ UTR. A cis element located within the 3′-UTR, Tj-cis, is necessary for piRNA biogenesis. In this study, we analyzed the structure of the Tj-cis RNA, a 100 nt RNA corresponding to the Tj-cis element, by the SHAPE and NMR analyses and found that a stable hairpin structure formed in the 5′ half of the Tj-cis RNA. The tertiary structure of the 16 nt stable hairpin was analyzed by NMR, and a novel stem-loop structure, the T-hairpin, was found. In the T-hairpin, four uridine residues are exposed to the solvent, suggesting that this stem loop is the target of Yb protein, a Tudor domain-containing piRNA biogenesis factor. The piRNA biogenesis assay showed that both the T-hairpin and the 3′ half are required for the function of the Tj-cis element, suggesting that both the T-hairpin and the 3′ half are recognized by Yb protein.