Melatonin (Mel), a classical antioxidant, has the potential to mediate ferroptosis. Cadmium (Cd) poses a substantial threat to the male reproductive system, as it can induce testicular injury by triggering ferroptosis. The study aimed to explore the protective role and mechanism of Mel in Cd-induced ferroptosis in spermatogonia (spg). Our results demonstrated that Cd disrupted the mitochondrial ultrastructure and induced more autophagosomes in spg. Exposure to Cd resulted in a reduction of the mitochondrial membrane potential of the cells. The transcriptomics analysis revealed significant differences in gene expression associated with ferroptosis and autophagy. Mel could reverse the changes caused by Cd in the genes mentioned above. Furthermore, Cd increased cellular iron content and elevated reactive oxygen species levels, which induced oxidative stress in spg. Mel pretreatment reduced iron accumulation and oxidative damage caused by Cd exposure. Additional studies demonstrated that Cd exposure activated NCOA4-mediated ferritinophagy in spg. Mel pretreatment, as anticipated, inhibited the increased the mRNA and protein expression of ATG5, LC3B, and NCOA4 caused by Cd, ameliorated Cd-caused iron overload and oxidative stress, and protected spg from ferroptosis. Our study provides a therapeutic basis for the use of Mel to treat Cd-induced testicular injury.