Exercise-induced hypoalgesia (EIH) typically reported during and/or following exercise, but less is known the mechanisms responsible for EIH. Previous reports suggest that melatonin plays a role in pain modulation. In this study, we investigated the role of melatonin on pain threshold at rest, and following exercise in both sedentary and exercise trained rats under light-induced functional pinealectomy. Male wistar rats were assigned to one of four groups: sedentary control (C), sedentary pinealectomized (Px), exercise trained (T), and trained under pinealectomy (T-Px) groups. Exercise trained groups were subjected to eight weeks of motor-driven treadmill exercise. C and T groups exposed to normal light/dark cycle (12:12-h light/dark cycle) and Px and T-Px rats exposed to continuous light for eight weeks. Hot-plate test was repeated before and after melatonin injection and paw withdrawal latencies were recorded as pain threshold. Acute exercise resulted increased pain threshold in all groups. Animals in T group had significantly highest pain thresholds compared with other groups, and pinealectomy resulted decreased pain threshold in trained animals both at rest, and following exercise. Pain threshold in T-Px group was found to be increased after melatonin administration. Our findings support the hypothesis that melatonin plays a role on hypoalgesic response in exercise-trained rats.