Abstract A fluorescence sensing platform based on metal–organic frameworks (MOFs) nanoparticles (NPs) of both zeolitic imidazolate framework-7 (ZIF-7) and zeolitic imidazolate framework-60 (ZIF-60) was developed for speciation analysis of inorganic Hg [Hg(II)] and methylmercury (MeHg+). Microwave-ultrasound assisted synthesis was employed for the preparation of ZIF-7 and ZIF-60 NPs, with short reaction time, easy procedure, and small particle size obtained. Based on strict cavity confinement of the ZIF-7 and ZIF-60 structures, the proposed method exhibited excellent selectivity for both Hg(II) and MeHg+, even in the presence of the other Hg species or various cations or anions with the concentration of 50 times high. Effect of pH and ionic strength on sensing behaviour of the ZIF MOF was studied as well. The calculated detection limit is 3ngmL−1 and 6ngmL−1 for Hg(II) and MeHg+, respectively. Furthermore, the application of the developed method to the analysis of local drinking water was demonstrated to be feasible, and the obtained recovery was 102% and 96.2% for Hg(II) and MeHg+, respectively.