Organophosphorus and organochlorine pesticides, historically or currently widely used in agriculture, are prevalent in the environment and pose significant risks to public health and ecosystems. This study aimed to develop a robust analytical method for quantifying these pesticides in soil and water. By optimizing solid-phase extraction (SPE) and Quick, Easy, Cheap, Effective, Rugged, and Safe (QuEChERS) procedures, and utilizing comprehensive two-dimensional gas chromatography coupled with time-of-flight mass spectrometry (GC × GC-TOF-MS), we achieved sensitive detection levels of all organophosphorus and organochlorine pesticides at 10 μg/kg for soil and 0.1 μg/kg for water samples. The mean recoveries were in the range of 74.2–118.3 % and 72.3–106.9 % at fortified concentration levels in soil and water, respectively. The method exhibited good linearity (R² ≥ 0.9874) and precision (relative standard deviations from 0.1 % to 29.9 %), providing a reliable approach for environmental monitoring and advancing the capabilities in pesticide residue analysis.