1,2-Ethanedithiol was firstly involved in preparing sulfur-containing functional magnetic polymer material of Fe3O4@SiO2@glycidyl methacrylate (GMA)-S-SH. The prepared Fe3O4@SiO2@GMA-S-SH magnetic nanoparticles (MNPs) show better adsorption capacity and adsorption/desorption dynamics for mercury species than other -SH functional materials due to the high affinity of both thioether and thiol group towards mercury. A new method of magnetic solid phase extraction (MSPE) using Fe3O4@SiO2@GMA-SSH as sorbents combined with high performance liquid chromatography (HPLC)-inductively coupled plasma mass spectrometry (ICP-MS) was developed for the analysis of trace Hg2+, methylmercury (MeHg+) and phenylmercury (PhHg+). Variables affecting the simultaneous extraction of three target mercury species were investigated. It was found that Hg2+, MeHg+ and PhHg+ in 200 mL of water sample could be quantitatively adsorbed within 5 min and eluted by 0.5 mL 0.1 mol L-1 nitric acid and 4% thiocarbamide in 2 min. The developed method has high actual enrichment factors of 367, 380, 329-fold for Hg2+, MeHg+ and PhHg+, respectively. The detection limits were 0.40, 0.49 and 1.4 ng L-1 with the relative standard deviations (n = 5, inter-day) of 7.4, 8.1 and 8.3% for Hg2+, MeHg+ and PhHg+ , respectively. The accuracy of the method was validated by the analysis of the Certified Reference Materials of GSS-11 soil, GSS-13 soil, GSB21 rice and DORM-2 fish. The established method was successfully used for the mercury speciation in farmland water, soil and rice samples collected from Wanshan, China, and satisfactory recoveries (84.3-116%) were obtained for the spiked samples. (C) 2019 Elsevier B.V. All rights reserved.