A novel modified carbon paste electrode that was based on Epoxide natural rubber 30 phr (electrode V) and Epoxide natural rubber spent coffee 5 phr (electrode X) as a chemical modifier was developed and used to quantify mercuric ions in water samples. The developed electrode exhibits a Nerstian response within ranges of 10−7 – 10−1 and 10−8 – 10−1 mol L−1, and the obtained limits of detection (LOD) were 4.5 × 10−8 and 6.9 × 10−9 mol L−1 for electrode IV and Electrode VII, respectively. The paste showed that it could be utilized for more than 125 and 140 days without showing any signs of deterioration. Moreover, the sensors were proved to be useable within pH ranges of 1.5 to 5.0, and 1.0 to 5.5, for the respectively mentioned electrodes. The isothermal coefficients were found to be 0.00011 and 0.00017 V/oC for electrode IV and electrode VII, respectively. Match potential method (MPM) selectivity coefficients show that mercury(II) ions have a high selectivity. Mercury may be distinguished from other cations quite well with the suggested electrode. The suggested sensors were applied successfully in the quantification of Hg(II) ions in real-world petroleum water samples. The unique abilities of these Epoxide natural rubber 30 phr is the key driver for adoption of (ISEs) principles to improve environmental friendliness of the analytical methods. The results from the developed approach and those from atomic absorption spectrometry (AAS) were statistically comparable.