This study examines the effect of melatonin on leptin-induced changes in transition of histone to protamine in adult rats during spermatogenesis. Twelve-week-old Sprague-Dawley rats were randomised into control, leptin-, leptin–melatonin-10-, leptin–melatonin-20- and melatonin-10-treated groups with six rats per group. Leptin was given via intraperitoneal injections (i.p.) daily for 42 days (60 μg/kg body weight). Rats in the leptin- and melatonin-treated groups were given either 10 or 20 mg day−1 kg−1 body weight of leptin in drinking water. Melatonin-10-treated group received only 10 mg of melatonin day−1 kg−1 body weight in drinking water for 42 days. Control rats received 0.1 ml of 0.9% saline. Upon completion of the treatment, sperm count, morphology and histone-to-protamine ratio were estimated. Gene expression of HAT, HDAC1, HDAC2, H2B, H2A, H1, PRM1, PRM2, TNP1 and TNP2 was determined. Data were analysed using ANOVA. Sperm count was significantly lower, whereas the fraction of spermatozoa with abnormal morphology, the ratio of histone-to-protamine transition and the expressions of HAT, HDAC1, HDAC2, H2B, H2A, H1, PRM1 were significantly higher in leptin-treated rats than those in controls or melatonin-treated rats. It appears that exogenous leptin administration adversely affects histone-to-protamine transition, which is prevented by concurrent administration of melatonin.