We developed a green, inexpensive and simple method for the synthesis of silver nanoparticles from the Opuntia Ficus (OF) Indica fruit juice. The synthesized AgNPs were used as sensor for the detection of toxic metal $$(\hbox {Hg}^{2+})$$ ( Hg 2 + ) using colorimetric technique as well as to investigate the antimicrobial activities against number of clinical isolates of human microbes. The synthesized AgNPs nanoparticles were characterized using UV–Vis spectroscopy, FTIR spectroscopy, scanning electron microscopy and EDX methods. The green synthesized AgNPs showed surface plasmon resonance absorption band at 441 nm, which confirm the formation of AgNPs that were also established by FTIR and EDX analyses. The colour of AgNPs changes from blood red to white in the presence of $$\hbox {Hg}^{2+ }$$ Hg 2 + only, which can be differentiated and detected by the naked eye within few seconds without the prerequisite of surface amendment from other metals (Co, Ni, Fe, Mn, Pb, Zn, Cr). A good linear response ( $${R}^{2}= 0.97$$ R 2 = 0.97 ) was obtained towards $$\hbox {Hg}^{2+}$$ Hg 2 + ions in the concentration range of $$10^{-3}$$ 10 - 3 to $$10^{-8}\hbox { M}$$ 10 - 8 M . In addition, all growth of the tested microbial stains ceased in varied range. OFAg-2 had the highest inhibition effect followed by OFAg-1, while OF did not show any antimicrobial activities. Candida albican and Klebsiella pneumonia are the most susceptible microbes by OFAg-2 and OFAg-1 respectfully. Klebsiella oxytocam, Proteus mirabilis and Klebsiella oxytoca had the moderate susceptibility from OFAg-2 and OF, while Staphylococcus aureus was found to be the lowest susceptible microbes. Therefore, OFAg-2 and OFAg-1 probably could be promising pharmaceutical agents against many microbial strains.