Assessing collective drug consumption based on the concentrations of illicit drugs and their metabolites in wastewater is a new technology. Currently, this technology is receiving attention in China, and methods for multiple illicit drug detection in wastewater are urgently needed. In our study, a method with a short runtime (7 min), a small solid-phase extraction (SPE) loading volume (50 mL) and high sensitivity (lower limits of quantitation (LLOQs) ranged from 0.2 to 5 ng/L) was developed for the simultaneous determination of amphetamines, ketamine, opiates, cocaine and their metabolites in wastewater. Samples were enriched by SPE on a mixed-mode sorbent (Oasis MCX) and analyzed by ultra-performance liquid chromatography-tandem mass spectrometry (UPLC-MS/MS). The limits of detection (LODs) ranged from 0.1 to 2 ng/L, and the LLOQs varied between 0.2 and 5 ng/L. Moreover, the method developed was applied to real wastewater samples collected from 15 different wastewater treatment plants (WWTPs). In the results, the most abundant compounds were morphine (1.8–46.6 ng/L) and codeine (3.7–24.9 ng/L), which were detected in 13 WWTPs. After successful optimization of the UPLC-MS/MS conditions and sample loading pH, the method developed is able to meet the needs of common illicit drug monitoring and high-throughput analysis requirements.