Unnecessary/unsafe opioid prescribing has become a major public health concern in the U.S. Statewide prescription drug monitoring programs (PDMPs) with varying characteristics have been implemented to improve safe prescribing practice. Yet, no studies have comprehensively evaluated the effectiveness of PDMP characteristics in reducing opioid-related potentially inappropriate prescribing (PIP) practices. The objective of the study is to apply machine learning methods to evaluate PDMP effectiveness by examining how different PDMP characteristics are associated with opioid-related PIPs for non-cancer chronic pain (NCCP) treatment. This was a retrospective observational study that included 802,926 adult patients who were diagnosed NCCP, obtained opioid prescriptions, and were continuously enrolled in plans of a major U.S. insurer for over a year. Four outcomes of opioid-related PIP practices, including dosage ≥50 MME/day and ≥90 MME/day, days supply ≥7 days, and benzodiazepine-opioid co-prescription were examined. Machine learning models were applied, including logistic regression, least absolute shrinkage and selection operation regression, classification and regression trees, random forests, and gradient boost modeling (GBM). The SHapley Additive exPlanations (SHAP) method was applied to interpret model results. The results show that among 1,886,146 NCCP opioid-related claims, 22.8% had an opioid dosage ≥50 MME/day and 8.9% ≥90 MME/day, 70.3% had days supply ≥7 days, and 10.3% were when benzodiazepine was filled ≤7 days ago. GBM had superior model performance. We identified the most salient PDMP characteristics that predict opioid-related PIPs (e.g., broader access to patient prescription history, monitoring Schedule IV controlled substances), which could be informative to the states considering the redesign of PDMPs.