The aim of this study was to explore the chemical composition and the effect of essential oil of Angelicae dahuricae radix on a nitroglycerin (NTG)-induced rat model of migraine. The CO2 supercritical fluid extraction method was optimized for the extraction of essential oil of A. dahuricae radix (EOAD) and its chemical composition was determined. The migraine model was established by subcutaneous injection of NTG (10 mg/kg) 1 h after the last administration of EOAD. The therapeutic effect of EOAD and its underlying mechanism were assessed by monitoring behavioral changes, levels of nitric oxide (NO) in serum and brain tissues, plasma levels of calcitonin gene-related peptide (CGRP) and endothelin (ET), and ET/NO ratio. The optimal conditions for CO2 supercritical fluid extraction of EOAD, as determined by orthogonal test [L9(34)], were as follows: 2 h extraction time, 20 MPa pressure, 40°C temperature, and 30 mesh. The yield of EOAD was 1.8%. On gas chromatography-mass spectrometry, 45 peaks were found in EOAD, and 22 compounds were identified and quantified. The main constituents of EOAD were 1-dodecanol (13.71%), elemene (7.54%), palmitic acid ethyl ester (7.32%), α-pinene (6.25%), and 1-pentadecanol (6.08%). Compared with rat migraine model controls, EOAD (35, 70, and 140 mg/kg) significantly reduced the number of head shaking, head scratching, and hind leg shooting events, decreased serum and brain NO levels, decreased plasma CGRP, and increased ET levels in rats. ET/NO ratio was elevated to 28.68 in the EOAD high-dose group. EOAD ameliorates NTG-induced migraine in rats likely by modulating the levels of vasoactive substances.