An in situ derivatization and solid-phase microextraction (SPME) method based on sol-gel technology coupled with gas chromatography-flame ionization detection was proposed for the determination of mercury [Hg(II)] at ultra-trace levels in water samples. The analytical procedure involves aqueous-phase derivatization of Hg(II) with phenylboronic acid in a sample vial and subsequent extraction with a sol-gel fiber coating. In this study, poly(ethylene glycol), modified with a coating fiber of multi-walled carbon nanotubes was used for the determination of mercury. The pH of the feed solution was kept at 5 with acetic acid-sodium acetate buffer solution. The optimized conditions are as follows: derivatization time, 10 min; extraction time, 60 min; extraction temperature, 40 degrees C; stirring rate, 1,000 rpm; sample volume, 5 mL. Under the optimal conditions, a detection limit of the method [signal-to-noise ratio (S/N) = 3] were obtained at 0.001 ng/mL and a limit of quantification (S/N = 10) were obtained at 0.005 ng/mL. Also, the relative standard deviations were obtained for one fiber (repeatability) (n = 5) and between fibers or batch to batch (n = 3) (reproducibility). The developed method was successfully applied to real water samples.