Systemic nitroglycerin (NTG) produces spontaneous-like migraine attacks in migraine sufferers and induces a condition of hyperalgesia in the rat 4 h after its administration. Endocannabinoid system seems to be involved in the modulation of NTG-induced hyperalgesia, and probably, in the pathophysiological mechanisms of migraine. In this study, the analgesic effect of anandamide (AEA) was evaluated by means of the formalin test, performed in baseline conditions and following NTG-induced hyperalgesia in male Sprague–Dawley rats. AEA was administered 30 min before the formalin injection. In addition, the effect of AEA (administered 30 min before NTG injection) was investigated on NTG-induced Fos expression and evaluated 4 h following NTG injection. AEA induced a significant decrease in the nociceptive behavior during both phases of the formalin test in the animals treated with vehicle, while it abolished NTGinduced hyperalgesia during the phase II. Pre-treatment with AEA significantly reduced the NTG-induced neuronal activation in nucleus trigeminalis caudalis, confirming the results obtained in our previous study, and in area postrema, while the same treatment induced an increase of Fos expression in paraventricular and supraoptic nuclei of the hypothalamus, parabrachial nucleus, and periaqueductal grey. The study confirms that a dysfunction of the endocannabinoid system may contribute to the development of migraine attacks and that a pharmacological modulation of CB receptors can be useful for the treatment of migraine pain.