Although previous studies have reported the variables that influence opioid use or dropout among participants receiving methadone treatment, limited attention has been given to the variables related to transitions among no opioid use, opioid use, and dropout. This retrospective study utilized data collected from June 2010 to June 2022 at 11 methadone treatment clinics in Guangdong Province, China. Two transient states (no opioid use and opioid use) and 1 absorbing state (dropout) were defined based on monthly urine morphine test results and daily methadone intake records. We used a multistate model to explore the variables associated with transitions among no opioid use, opioid use, and dropout among participants. Among 3136 participants, with an average treatment duration of 497 days, 1646 (52.49%) underwent at least 1 period of opioid use, resulting in 3283 transitions from no opioid use to opioid use. The transitions between no opioid use and opioid use were significantly associated with variables such as age, gender, employment status, marital status, living situation, travel time to the clinic, human immunodeficiency virus and hepatitis C virus infection statuses, average methadone dosage, and attendance rates. The variables influencing participants' dropout varied depending on their opioid use behaviors. Additionally, the probability of a specified opioid use state remaining unchanged or transitioning to a different state at a defined time point would change over time. The opioid use behaviors of participants are dynamic. Methadone providers should offer targeted interventions based on participants' opioid use behaviors to effectively decrease rates of opioid use and improve retention.