In most holometabolous insects, transformer-2 (tra-2) is an auxiliary gene required for sex determination, exerting a crucial role in regulating sexual differentiation; however, the study of tra-2 in hemimetabolous insects remains very sparse and limited to just a few species. In this study, we investigated the sequence and expression profile of the tra-2 gene in the bean bug, Riptortus pedestris, an agricultural pest belonging to the Heteroptera order. Three non-sex-specific splicing isoforms of Rptra-2 were found, Rptra-2293, Rptra-2284, and Rptra-2299, which shared most exons and exhibited similar expression throughout all stages of development, with particularly elevated levels in the embryo, ovary, and testis. RNAi knockdown experiments revealed that the suppression of Rptra-2 in nymphs led to abnormal females, characterized the formation of male-specific external genital, and also caused longer nymph duration. Knockdown of the expression of the Rptra-2 gene in newly emergent virgin females would cause ovarian arrest, and injecting the 8th-day virgin females with dsRptra-2 also caused a noticeable decline in the offspring numbers. Conversely, in dsRptra-2-treated males, the testes maintained normal morphology but experienced impaired reproductive capacity, attributed to diminished sperm viability. These findings highlight the crucial role of Rptra-2 in the sex determination and fertility of R. pedestris, providing valuable insights into the sex determination mechanisms of hemimetabolous insects.