Highly efficient azo-day triazole derivatives carrying a π bond and OH electron donor groups have been designed, synthesized, and evaluated as colorimetric chemosensors for detecting metal ions in environmental samples, which was further supported by the functional theory studies and UV–Vis spectrophotometric experiment. The 4-amino-5-(2-((2,3-dimethylphenyl)amino)phenyl)-4H-1,2,4-triazole-3-thiol was directed to react with 3-nitrophenol during a diazotization type reaction to form an azo-day 4-((3-(2-((2,3-dimethylphenyl) amino)phenyl)-5-mercapto-4H-1,2,4-triazol-4-yl)diazenyl)-3-nitrophenol (Y), which have been confirmed by FTIR, 1H NMR, and could also be easily used for the detection metal ions. Compound (Y) exhibited a rapid quantitative method for the detection of Co(II) at λmax (532 nm) in an aqueous solution. The current study introduces a facile, low cost, more specific and selective chemosensor for detecting trace amounts of cobalt ions. KEY WORDS: Mefenamic acid, Azo dye, Cobalt(II), Spectroscopy Bull. Chem. Soc. Ethiop. 2024, 38(5), 1557-1567. DOI: https://dx.doi.org/10.4314/bcse.v38i6.5