A simple and efficient dithizone-functionalized solid-phase extraction (SPE) procedure, online coupled with high-performance liquid chromatography (HPLC)-inductively coupled plasma mass spectrometry, was developed for the first time for enrichment and determination of ultra-trace mercury (Hg) species (inorganic divalent Hg (Hg(II)), methylmercury (CH3Hg(II)) and ethylmercury (C2H5Hg(II)) in cereals and environmental samples. In the proposed method, functionalization of the commercial C18 column with dithizone, enrichment, and elution of the above Hg species can be completed online with the developed SPE device. A simple solution of 2-mercaptoethanol (1% (V/V)) could be used as an eluent for both the SPE and HPLC separation of Hg species, significantly simplifying the method and instrumentation. The online SPE method was optimized by varying dithizone dose, 2-mercaptoethanol concentration, and sample volume. In addition, the effect of pH, coexisting interfering ions, and salt effect on the enrichment was also discussed. Under the optimized conditions, the detection limits of Hg species for 5 mL water sample were 0.15 ng/L for Hg(II), 0.07 ng/L for CH3Hg(II), and 0.04 ng/L for C2H5Hg(II) with recoveries in the range of 85%–100%. The developed dithizone-functionalized C18 SPE column can be reused after a single functionalization, which significantly simplifies the enrichment step. Moreover, the stability of Hg species enriched on the SPE column demonstrated its suitability for field sampling of Hg species for later laboratory analysis. This environment-friendly method offers a robust tool to detect ultra-trace Hg species in cereals and environmental samples.