Hydrocodone is an opioid medication used to treat moderate to severe pain. Because it has a risk of dependence and overdose, it is a controlled substance in many countries, including the United States. Hydrocodone is an opioid medication used to treat moderate to severe pain. Because it has a risk of dependence and overdose, it is a controlled substance in many countries, including the United States.