This study investigated the protective effects of melatonin against formaldehyde-induced oxidative damage and apoptosis in rat testes. A total of 21 male Wistar rats were divided into three groups. Group I was used as a control, Group II was injected every other day with formaldehyde for 1 month, whereas Group III was injected every other day with formaldehyde and melatonin for 1 month. At the end of the experimental period animals were sacrificed and the testes removed and dissected from the surrounding tissues for immunohistochemical evaluation. In addition, the levels of superoxide dismutase (SOD), glutathione peroxidase (GSH-Px), and malondialdehyde (MDA) were determined. The levels of SOD and GSH-Px decreased significantly, whereas the level of MDA significantly increased in animals treated with formaldehyde compared with the controls. Apoptosis of spermatogenetic and Leydig cells of testicular tissues was observed. In contrast, rats with melatonin SOD and GSH-Px enzyme activity increased whereas MDA levels decreased with formaldehyde exposure along with apoptosis. In view of the present findings, it is suggested that melatonin treatment may prevent formaldehyde-induced oxidative damage and apoptosis in rat testes.