Dihydroergotamine is used to treat migraine headaches (severe, throbbing headaches that sometimes are accompanied by nausea and sensitivity to sound and light). Dihydroergotamine is in a class of medications called ergot alkaloids. It works by tightening blood vessels in the brain and by stopping the release of natural substances in the brain that cause swelling.