Diquat is a fast, potent, and widely used bipyridine herbicide in agriculture and it induces oxidative stress in several animal models. However, its genotoxic effects on the male reproductive system remain unclear. Melatonin is an effective free-radical scavenger, which has antioxidant and anti-apoptotic properties and can protect the testes against oxidative damage. This study aimed to investigate the therapeutic effects of melatonin on diquat-induced testicular injury in mice. The results showed melatonin treatment alleviated diquat-induced testicular injury, including inhibited spermatogenesis, increased sperm malformations, declined testosterone level and decreased fertility. Specifically, melatonin therapy countered diquat-induced oxidative stress by increasing production of the antioxidant enzymes GPX1 and SOD1. Melatonin treatment also attenuated diquat-induced spermatogonia apoptosis in vivo and in vitro by modulating the expression of apoptosis-related proteins, including P53, Cleaved-Caspase3, and Bax/Bcl2. Moreover, melatonin restored the blood-testicular barrier by promoting the expression of Sertoli cell junction proteins and maintaining the ordered distribution of ZO-1. These findings indicate that melatonin protects the testes against diquat-induced damage by reducing oxidative stress, inhibiting apoptosis, and maintaining the integrity of the blood–testis barrier in mice. This study provides a theoretical basis for further research to protect male reproductive health from agricultural pesticides.