Taiwan, identified as pivotal in the Asian drug trafficking chain, has been experiencing a surge in illicit drug-related issues. Wastewater-based epidemiology (WBE) has emerged as a promising approach for comprehensive evaluation of actual illicit drug usage. This study presents the first WBE investigation of illicit drug consumption in Taiwan based on the analysis of wastewater from four wastewater treatment plants (WWTPs) in the Taipei metropolitan area. Additionally, it demonstrates a high correlation between the amounts of illicit drugs seized and influent concentrations over an extended period of time. The reliability of solid-phase extraction and analysis via high-performance liquid chromatography-tandem mass spectrometry (HPLC-MS/MS) was validated for 16 illicit drugs (methamphetamine, ketamine, cocaine, codeine, methadone, morphine, meperidine, fentanyl, sufentanil, para-methoxyamphetamine (PMA), para-methoxymethamphetamine (PMMA), 3,4-methylenedioxymethamphetamine (MDMA), cathinone, methcathinone, mephedrone (MEPH), and 4-methylethcathinone (4-MEC)). Methamphetamine, ketamine, and 4-MEC were consistently detected in all wastewater samples, underscoring their prevalence in the Taipei metropolitan area. Biochemical oxygen demand (BOD) and ammonia nitrogen (ammonia N) were employed to reduce uncertainty in estimations of population size during back-calculation of illicit drug consumption. The results indicate that methamphetamine was the most consumed drug (175-740 mg day-1 1000 people-1), followed by ketamine (22-280 mg day-1 1000 people-1). In addition, urban-related WWTPs exhibited higher consumption of methamphetamine and ketamine than did the suburban-related WWTP, indicating distinct illicit drug usage patterns between suburban and urban regions. Moreover, an examination of temporal trends in wastewater from the Dihua WWTP revealed a persistent predominance of ketamine and methamphetamine, consistent with statistical data pertaining to seizure quantities and urine test results. The study provides encouraging insight into spatial and temporal variations in illicit drug usage in the Taipei metropolitan area, emphasizing the complementary role of WBE in understanding trends in illicit drug abuse.