This medication is used to help relieve severe ongoing pain (such as due to cancer). Fentanyl belongs to a class of drugs known as opioid (narcotic) analgesics. It works in the brain to change how your body feels and responds to pain. Do not use the patch form of fentanyl to relieve pain that is mild or that will go away in a few days. This medication is not for occasional (“as needed”) use.