In order to monitor the risk of pesticide pollutants in drinking water, an analytical method based on online-solid phase extraction coupled with ultra performance liquid chromatography-triple quadrupole mass spectrometry (online-SPE-UPLC-MS/MS) was established for the simultaneous rapid screening and determination of 107 pesticides and metabolites (organophosphorus, organic nitrogen, organic heterocycle, carbamate, amide, benzoyl urea, neonicotinoid, etc.) in raw water and drinking water. Different injection volumes (5, 10, and 15 mL) were compared. The detection response increased with an increase in the injection volume, but the matrix effect also became more pronounced. Under the premise of ensuring the sensitivity of the method and meeting the detection requirements, the injection volume was selected as 5 mL. Accordingly, the samples were filtered through a 0.22-μm hydrophilic polytetrafluoroethylene filter, and then, 5 mL samples were injected into the online-SPE system by the automatic sampler. After adsorption on an X Bridge C18 online-SPE column, the samples were washed with pure water and eluted by gradient elution using acetonitrile and 0.1% formic acid aqueous solution as the mobile phases, with separation on an ACQUITY HSS T3 column. The samples were detected by multiple reaction monitoring with electrospray ionization in positive and negative ion modes, and quantified by an external standard method. Using raw water and drinking water as the sample matrices, the accuracy and precision of the method were verified. The 107 pesticides and metabolites showed good linear relationships in different ranges with correlation coefficients (r2)>0.995. The limits of detection (LODs, S/N=3) of the method were 0.03-1.5 ng/L, and the limits of quantification (LOQs, S/N=10) were 0.1-5.0 ng/L. The target pesticides were spiked at concentration levels of 1, 20, and 50 ng/L. The spiked recoveries of the 107 targets in raw water and drinking water samples were 60.6%-119.8% and 61.2%-119.0%, respectively. The corresponding relative standard deviations (RSDs, n=6) were 0.3%-18.6% and 0.4%-17.1%. The pesticide residues in raw water and drinking water were determined by this method. Amide herbicides, triazine herbicides, triazole insecticides, carbamate insecticides, and neonicotinoid insecticides had high detection rates. The detected concentrations ranged from 0.1 to 97.1 ng/L in raw water and from 0.1 to 93.6 ng/L in drinking water. The sample consumption of online-SPE method was lower than that in the traditional off-line SPE methods, which greatly improved the convenience of sample collection, storage, and transportation. The samples only need to be filtered before injection and analysis. The method is simple to operate and shows good reproducibility. With this online-SPE method, only 23 min were required from online enrichment to detection completion. The developed method has the advantages of high analytical speed and high sensitivity. The method is suitable for the trace analysis and determination of 107 typical pesticides in raw water and drinking water, which effectively improves the detection efficiency of pesticides in water and has high potential for practical application. It can extend technical support for the pollution-level analysis of typical pesticides and metabolites in drinking water and provide an objective basis for human health risk assessment.