Managing severe pain. When used to treat pain, it is only for use when continuous (around-the-clock) treatment is needed for a long time. It is also only used when other pain treatments do not treat your pain well enough or you cannot take them. It is not for use right after surgery, if you need only occasional or as-needed pain relief, or if the pain is mild or is not expected to last for a long time. Methadone is also used in treating narcotic (opioid) addiction as part of a treatment program. It may also be used for other conditions as determined by your doctor. Methadone is a narcotic (opioid) medicine. It works by acting in the brain and nervous system.