Much evidence demonstrates the antinociceptive effect of magnetic fields (MFs). However, the analgesic action mechanism of the electromagnetic field (EMF) is not exactly understood. The aim of the present study was to investigate the effects of 5-HT1 and 5-HT2 receptor agonists (serotonin HCl and 2,5-dimethoxy-4-iodoamphetamine [DOI] hydrochloride) on EMF-induced analgesia. In total, 66 adult male Wistar albino rats with an average body mass of 225 +/- 13 g were used in this study. The animals were subjected to repeated exposures of alternating 50 Hz and 5 mT EMF for 2 h a day for 15 days. Prior to analgesia tests, serotonin HCl (5-HT1 agonist) 4 mg/kg, WAY 100635 (5-HT1 antagonist) 0.04 mg/kg, DOI hydrochloride (5-HT2 receptor agonist) 4 mg/kg, and SB 204741 (5-HT2 antagonist) 0.5 mg/kg doses were injected into rats. For statistical analysis of the data, analysis of variance was used and multiple comparisons were determined by Tukey's test. Administration of serotonin HCl MF (5 mT)-exposed rats produced a significant increase in percent maximal possible effect (% MPE) as compared with EMF group (P < 0.05). On the contrary, injection of WAY 100635 to MF-exposed rats produced a significant decrease in analgesic activity (P < 0.05). Similarly, the administration of DOI hydrochloride significantly increased % MPE values as compared with the EMF group while SB 204741 reduced it (P < 0.05). In conclusion, our results suggested that serotonin 5-HT1 and 5-HT2 receptors play an important role in EMF-induced analgesia; however, further research studies are necessary to understand the mechanism. Bioelectromagnetics. 2019;40:319-330. (c) 2019 Bioelectromagnetics Society.