We report the facile hydrothermal synthesis of polyaniline (PANI)-modified molybdenum disulfide (MoS2) nanosheets to fabricate a novel organic–inorganic hybrid material. The prepared 3D nanomaterial was characterized by field emission scanning electron microscopy, high-resolution transmission electron microscopy, energy-dispersive X-ray spectroscopy and X-ray diffraction studies. The results indicate the successful synthesis of PANI–MoS2 hybrid material. The PANI–MoS2 was used to study the extraction and preconcentration of trace mercury ions. The experimental conditions were optimized systematically, and the data shows a good Hg(II) adsorption capacity of 240.0 mg g−1 of material. The adsorption of Hg(II) on PANI–MoS2 hybrid material may be attributed to the selective complexation between the–S ion of PANI–MoS2 with Hg(II). The proposed method shows a high preconcentration limit of 0.31 µg L−1 with a preconcentration factor of 640. The lowest trace Hg(II) concentration, which was quantitatively analyzed by the proposed method, was 0.03 µg L−1. The standard reference material was analyzed to determine the concentration of Hg(II) to validate the proposed methodology. Good agreement between the certified and observed values indicates the applicability of the developed method for Hg(II) analysis in real samples. The study suggests that the PANI–MoS2 hybrid material can be used for trace Hg(II) analyses for environmental water monitoring.