It is used to treat various types of seizure disorders. Valproic acid is sometimes used together with other seizure medications, It is also is also used to treat manic episodes related to bipolar disorder (manic depression), and to prevent migraine headaches.