Amitriptyline, sold under the brand name Elavil among others, is a medicine primarily used to treat a number of mental illnesses. These include major depressive disorder and anxiety disorders, and less commonly attention deficit hyperactivity disorder (ADHD) and bipolar disorder. Other uses include prevention of migraines, treatment of neuropathic pain such as fibromyalgia and postherpetic neuralgia, and less commonly insomnia. It is in the tricyclic antidepressant (TCA) class and its exact mechanism of action is unclear. Amitriptyline is taken by mouth.