Orchitis is a frequent inflammatory reproductive disease that causes male infertility and a decline in sperm quality. Gut microbiota can regulate systemic and local inflammation, spermatogenesis and blood-testosterone barrier (BTB). In this study, we investigated correlation between gut microbiota and orchitis by establishing a mouse gut microbiota imbalance model induced by antibiotics (ABX) treatment and orchitis model induced by lipopolysaccharide (LPS) infection. Based on these two models, 16s rRNA sequencing and feces microbiota transplantation (FMT) experiments were combined to examine the function and regulatory mechanisms of the gut microbiota in host defense against orchitis. Compared with control mice, gut microbiota imbalance resulted in increasing inflammatory responses, modulating oxidative stress related enzyme activity, testosterone levels and the permeability of blood testosterone barrier, which are restored after FMT. Subsequently, we tested the relationship between the gut microbiota imbalance and testicular inflammation severity in orchitis. It was found that the ABX and LPS co-treated mice had more severe inflammatory responses, lower testosterone levels and greater permeability of the BTB than the LPS-treated mice, but these changes could be partially recovered by gut microbiota transplantation.In conclusion, these above results proved for the first time that gut microbiota is involved in the pathogenesis of orchitis, which laid a good foundation for the subsequent development of anti-orchitis drugs and probiotic targeting intestinal flora.