A sensitive analytical method for the quantification of malodourous hydrogen sulfide (H2S) and methanethiol (CH3SH) was developed and validated. The method consisted of solid-phase microextraction with concomitant in-fibre derivatisation of the mercaptan using N-ethylmaleimide. The adducts were analysed by GC–MS using a triple quadrupole in the selected reaction monitoring mode. The limits of detection of solutions of H2S and CH3SH in water were 100 and 10 ng L−1, respectively, below their odour-perception thresholds. The analytical method was used to show the scavenging effect of 1,2-benzisothiazol-3(2H)-one (Proxel) and 2-methyl-4-isothiazolinone. The mechanism by which H2S and CH3SH are trapped with Proxel was studied by ultraperformance liquid chromatography (UPLC)-MS.