We investigated the use of melatonin to improve fertility and reduce uterine damage caused by torsion of the uterus in pregnant rats. We used 35 pregnant rats at gestational age 18 days. The animals were randomized into five groups. Group 1 was anesthetized only. Group 2 was subjected to experimental uterine torsion of 360 degrees and the torsion was corrected after 6 h. Group 3 was subjected to uterine torsion of 360 degrees, the torsion was corrected after 6 h and melatonin was administered at the time of correction. Group 4 rats were subjected to 360o uterine torsion and melatonin was administered 6 h later at the time of correction. Group 5 was administered melatonin followed by uterine torsion of 360 degrees followed by correction of torsion 6 h later. Samples were obtained from the uterine horns on the day 1 postpartum. We used Bax, Bcl-2 and caspase 3 staining to measure apoptosis in the uterine tissues. The mRNA levels of Rho-associated, coiled-coil containing protein kinases 1 (ROCK1), homeobox D10 (Hox4 HoxD10), TLR4, NF kappa B1, caveolin 1 (Cav1) heat shock protein 90 alpha (cytosolic), class B member 1 (Hsp90ab1) and glyceraldehyde-3-phosphate dehydrogenase (GAPDH) were determined using quantitative real-time polymerase chain reaction analysis (qRT-PCR). Bax, Bcl-2 and caspase 3 were detected using immunohistochemistry. No difference was observed among groups with respect to abortion, neonatal mortality or congenital abnormalities. Compared to the control group, the mRNA levels of Rock1, Hox4, TLR4, NF kappa B1, Cav1 and Hsp90 genes were decreased significantly in the study groups; the decrease was greater in groups 3 and 4, which were treated with melatonin. The greatest amount of Bax staining was found in group 1 and the least amount of Bcl-2 staining was found in groups 4 and 5; the greatest amount of caspase 3 staining was found in group 2. Our findings indicate that melatonin reduced uterine torsion related tissue damage and that its application during torsion was more effective than application following removal of torsion.