Testicular torsion/detorsion can cause testis loss and infertility. Aloperine is a major active alkaloid extracted from Sophora alopecuroides Linn. It has been shown to have organ-protective effects. However, the effects of aloperine on the testis and its underlying mechanisms remain unclear. This study investigated the effect of aloperine on testicular torsion/detorsion injury in rats. Male Sprague-Dawley rats were randomized to the sham-operated (sham), testicular I/R (TI/R), or aloperine preconditioning (ALOPre) or postconditioning (ALOPost) groups. All rats except for the sham-operated rats were subjected to 3h of right spermatic cord torsion (720°, clockwise), followed by 3h of detorsion. Aloperine (10mg/kg) was intravenously administered before testicular torsion (ALOPre) or at the onset of testicular detorsion (ALOPost). The therapeutic efficacy of aloperine was evaluated by histological analysis, oxidative stress evaluation, inflammatory response examination, apoptosis analysis, protein analysis, and immunohistological assessment. Compared with TI/R, aloperine protected both the ipsilateral and contralateral testes against unilateral testicular I/R, as evidenced by a reduced testicular weight to body weight (TW/BW) ratio (ALOPre: p=0.0037; ALOPost: p=0.0021) and volume (ALOPre: p=0.0020; ALOPost: p=0.0009), less structural damage with better Johnsen (ALOPre: p=0.0013; ALOPost: p=0.0021), and Cosentino scores (ALOPre: p<0.0001; ALOPost: p<0.0001), increased mean seminiferous tubule diameter and mean seminiferous tubule epithelial height, decreased testicular apoptosis, and less oxidative stress and inflammatory response. In addition, aloperine significantly stimulated the phosphorylation of signal transducer and activator of transcription (STAT)-3 in the ipsilateral testes following detorsion. Administration of Ag490 suppressed STAT-3 phosphorylation, thereby abrogating the protective effects exerted by aloperine on the ipsilateral testis. Aloperine has a strong testicular protective effect on the ipsilateral and contralateral testes after testicular torsion/detorsion. This aloperine-induced ipsilateral testicular protection is mediated via the STAT-3 signaling pathway.