The substrate N1, N3, N5 -tris(2-hydroxyphenyl)benzene-1,3,5-tricarboxamide (Sensor A) was prepared in the reaction of 1,3,5-benzenetricarboxylic acid (trimesic acid) and o-aminophenol in ethanol. The prepared organic sensor fulfills the chemiluminescent requirements including luminophore, spacer, and suitable binding receptor that distress the probe's luminescent features, providing selective and sensitive detection of mercury and iron ions in aqueous solutions. The sensor selectively detects mercury and iron ions in a water matrix containing various metal ions including sodium, calcium, magnesium, zinc, and nickel. Strong and immediate binding was observed between mercury ions and the substrate at pH 7.0 with a binding affinity toward Hg (II) enhanced by nine folds higher than that observed for iron sensor binding affinity, which makes the substrate a distinctive luminescence sensor for mercury detection at ambient conditions. The sensor shows a linear response toward Hg (II) in the concentration range from 4.2 x 10-5 to 2.0 x 10-8 M with a limit of detection of 1.0 x 10-8 M. Further, Sensor A provides linear detection for iron ions in the range from 1.5 x 10-3 to 1.5 x 10-8 M. The measured adsorption capacity of Sensor A toward mercury ions ranged from 1.25 to 1.97 mg/g and the removal efficiency from water samples reached 98.8% at pH 7.0. The data demonstrate that Sensor A is an excellent probe for detecting and removing mercury ions from water bodies.