Abstract In the present work, a new method is proposed for the analysis of linear (lVMS) and cyclic methylsiloxanes (cVMS) in waters and sediments. The method is based on liquid–liquid extraction followed by gas chromatography coupled to tandem mass spectrometry (GC–MS/MS) using a triple quadrupole analyser (QqQ) working in selected reaction monitoring (SRM) mode. The instrumental parameters were optimized taking into account the interaction between different parameters and not only individual effects of variables. The method was validated yielding to convenient linearity and precision (RSD% <16%), and limits of quantification in the low ng/L and ng/g orders for wastewaters and river sediments, respectively. To the author's knowledge it is the first time that GC–MS/MS is used for analyzing methylsiloxanes in waters and sediments. The method was applied to the analysis of surface water and river sediments from the Llobregat River and Riera de Rubí (Catalonia, NE of Spain) and the influents and effluents of 17 wastewater treatment plants (WWTPs). The main results of this study showed that methylsiloxanes were present in all the analyzed wastewater samples, with cVMS being found at higher concentrations. Decamethylcyclopentasiloxane (D5) was the predominant compound, the maximum concentration was 8915ng/L in influent wastewater and treated effluents, and the median concentration was 273ng/L. Although these samples were collected primarily for method development purposes and have limited statistical value for characterizing spatial and temporal patterns, they represent a significant contribution to dataset needed to verify exposure calculations in environmental risk assessment studies, for a significantly wide range of dimethylsiloxane analytes.