Testicular dysfunction is caused by chronic exposure to environmental pollution, such as malathion, which causes oxidative stress, promoting cell damage. Autophagy is a key cellular process for eliminating malfunctioning organelles, such as the mitochondria (mitophagy), an eminent source of reactive oxygen species (ROS). Autophagy is crucial for protection against testicular damage. Rifaximin (RFX) is a non-absorbable antibiotic that can reshape the gut microbiome, making it effective in different gastrointestinal disorders. Interestingly, the gut microbiome produces short chain fatty acids (SCFAs) in the circulation, which act as signal molecules to regulate the autophagy. In this study, we investigated the regulatory effects of RFX on gut microbiota and its circulating metabolites SCFA and linked them with the autophagy in testicular tissues in response to malathion administration. Moreover, we divided the groups of rats that used malathion and RFX into a two-week group to investigate the mitophagy process and a four-week group to study mitochondriogenesis. The current study revealed that after two weeks of cotreatment with RFX, apoptosis was inhibited, oxidative stress was improved, and autophagy was induced. More specifically, PINK1 was overexpressed, identifying mitophagy activation. After four weeks of cotreatment with RFX, there was an increase in acetate and propionate-producing microflora, as well as the circulating levels of SCFAs. In accordance with this, the expression of PGC-1α, a downstream to SCFAs action on their receptors, was activated. PGC-1α is an upstream activator of mitophagy and mitochondriogenesis. In this sense, the protein expression of TFAM, which regulates the mitochondrial genome, was upregulated along with a significant decrease in apoptosis and oxidative stress. Conclusion: we found that RFX has a positive regulatory effect on mitophagy and mitochondria biogenesis, which could explain the novel role played by RFX in preventing the adverse effects of malathion on testicular tissue.