In this study, a new method has been developed and, the method has been validated to analyze dimethyl sulfate (DMS) which known as a genotoxic impurity. DMS has been detected in trace levels within the drug substance pantoprazole sodium sesquihydrate using the derivatization method. Triethylamine has been used as derivatization reagent. Due to the highly polar nature of the derivatization product, which is a quaternary ammonium ion, a polar retention Hilic column has been used for chromatographic separation. The Waters QDA detector has been used in the single ion recording (SIR) mode at m/z 116 for the detection of the quaternary ammonium ion. In this study, the recovery rates have been achieved within the range of 96.46–105.98%. The LOD has been determined as 1.94E-07 mg/mL, and the LOQ has been determined as 6.46E-07 mg/mL. From the results, it can be said that the improved method in this study, would enables fast and reliable solutions for routine quality control analyses for DMS in API companies that especially is producing PSS.