RNA interference (RNAi)‐based gene silencing is a feasible and sustainable technology for the management of hemipteran pests by double‐stranded RNA involvement, including small‐interfering RNA, microRNA, and Piwi‐interacting RNA (piRNA) pathways, that may help to decrease the usage of chemical insecticides. However, only a few data are available on the somatic piRNAs and their biogenesis genes in Riptortus pedestris, which serves as a significant pest of soybean (Glycine max). In this study, two family members of the PIWI gene were identified and characterized in R. pedestris, containing Argonaute3 (RpAgo3) and Aubergine (RpAub) genes with conserved protein domains, and their clusters were validated by phylogenetic analysis. In addition, they were widely expressed in all developmental stages of the whole body of R. pedestris and had lower expression levels in R. pedestris guts under different rearing conditions based on previous transcriptome sequencing. Furthermore, abundant clean reads were filtered to a total number of 45,998 piRNAs with uridine bias at the first nucleotide (nt) position and 26–32 nt in length by mapping onto the reference genome of R. pedestris according to our previous whole‐transcriptome sequencing. Finally, our data revealed that gut bacterial changes were significantly positively or negatively associated with differentially expressed piRNAs among the five comparison groups with Pearson correlation analysis. In conclusion, these findings paved new avenues for the application of RNAi‐based biopesticides for broad‐spectrum hemipteran pest control.