Development of selective colorimetric detectors that can use green-fabricated silver nanoparticles’ (AgNPs) with localized surface plasmon resonances (LSPRs) to rapidly, simply, and selectively detect HgII ions was undertaken in this study. Onion extract was used for synthesising photo-induced green crystalline silver nanoparticles (NPs). The formation of nanoparticles is enhanced when ultrasound irradiation is present; bioligands could serve as stabilizing and reducing agents. Different methods of measurement, including UV-Vis, TEM,SEM/EDAX,FT−IR, and XRD, are effective for characterization of nanoparticles. The spherical nature of green-fabricated AgNPs is confirmed by TEM. High-density, spherical, and uniformly formed silver nanoparticle shapes were found in silver nanoparticle SEM images. The arrangement of AgNPs in the form of face-centered cubic structures was confirmed by XRD patterns. The formation of impurity-free AgNPs was confirmed using the EDAX analysis results. Hg2+ with excellent sensitivity was sensitively and selectively detected by employing green-synthesized silver nanoparticles. The reduction of Ag (1) to Ag (0) was confirmed by a slight increase in Hg (II) concentration and progressive reduction of green-synthesized AgNPs, whose absorbance changed abruptly. The reduction of LSPRs by the phosphate buffer medium enables AgNPs to sensitively and selectively detect Hg2+ ions by providing good environment. Besides, a selective, sensitive, simple, and rapid method that is proposed for detecting Hg (II) ions in samples of water is presented in the study. Harmful mercury ions in real samples of water (tap and ground water) can colorimetrically and selectively be detected using the AgNPs. The results showed an RSD of below 6% and over 92% of good recovery.