Psilocybin is found in a family of mushrooms commonly known as Psilocybe. We aimed to study the antinociceptive efficacy of psilocybin using formalin-induced noxious stimuli, a model that comprises both acute and persistent pain in rats. Adult male Sprague–Dawley rats were used. Psilocybin (0.1, 0.3, and 1 mg/kg, IP) or vehicle was administered, and 6 h later, formalin (5%, 50 µL, subcutaneous) was injected into the hindpaw, and the number of flinches and time spent for licking were recorded for 0–10 and 20–60 min for acute and tonic phases, respectively. Another set of rats was used to examine if the antinociceptive effect of psilocybin is via 5-hydroxytryptamine
2a
receptor (5-HT
2A
R). For this aim, rats were pretreated with volinanserin (0.1 mg/kg, highly selective 5-HT
2A
R antagonist) or vehicle 30 min before psilocybin (0.3 mg/kg). Six hours later, formalin was injected, and the number of flinches and time spent for licking were recorded. Psilocybin (0.1 and 0.3 mg/kg) significantly reduced flinching and licking behaviors in both acute and late pain phases and pretreatment with volinanserin blocked the antinociceptive effect of psilocybin. Our results suggest that psilocybin produces an analgesic effect for acute and tonic inflammatory pain, at least in part, by activating 5-HT
2A
R.