Drug abuse is a social issue worldwide, and there is an increasing demand for on-site rapid detection of illicit drugs. In this study, a rapid and simple analytical method for the detection of 6-monoacetylmorphine (6-MAM), methamphetamine (MA), methylenedioxymethamphetamine (MDMA), ketamine (K), norketamine (NK), and cocaine (COC) in urine was developed. The developed method combines C18 pipette-tip based solid-phase extraction (C18 PT-SPE) with a miniaturized mass spectrometer (miniMS), exhibiting remarkable simplicity, high sensitivity, and strong reliability, compared with the conventional method. The optimal extraction and elution conditions for C18 PT-SPE were considered as 9 and 3 aspirating-dispensing cycles, respectively. The miniMS parameters including spray voltage, isolation potential, and collision-induced dissociation energy for the detection of these six illicit drugs were optimized using a nano-electrospray ionization method. The limit of detection (LOD), limit of quantification (LOQ), linear range, and linearity for the analysis of six illicit drugs in urine with the proposed C18 PT-SPE-miniMS method were determined. Except for the LOD of K and COC was determined as 0.5 and 0.25 ng mL−1 respectively, and the LOD of 6-MAM MA, MDMA, and NK was determined as 1 ng mL−1. This method enables rapid on-site detection, providing easier operation, lower cost, and better portability compared to conventional methods, making it a potential tool in drug crime investigation and forensic science.