A multidisciplinary team developed Fentanyl-Hunter, a machine learning-based platform that rapidly and accurately screens for fentanyl and its analog metabolites in biological and environmental samples. The platform discovered 27 previously unknown fentanyl metabolites, including in patient samples. Given the surge of fentanyl-related overdose deaths, this tool offers vital forensic and toxicological insights to combat the evolving synthetic opioid crisis.