A novel imidazole-based Schiff base ligand (Z)-N’-((1H-imidazol-2-yl)methylene)-2-hydroxybenzohydrazide (IMBH), was effectively synthesized and characterized using spectroscopic methods. Chemosensor IMBH’s chelation enhanced fluorescence (CHEF) is responsible for its extremely selective and sensitive detection of Cu2+ and Fe2+ ions in DMSO solutions. Adding different metal ions (30 μM) allowed for the determination of the fluorescence behaviour of IMBH (50 μM). The findings showed that, only for Cu2+ and Fe2+ ions, a notable fluorescence quenching in the emission was seen at 465 nm with an excitation at 320 nm. Furthermore, the Job’s plot and mass spectral analysis showed that IMBH bound Cu2+ and Fe2+ ions at a 2:1 (Ligand:Metal) ratio. For the Cu2+ and Fe2+ ions, the limit of detection (LOD) was found to be 0.204 × 10−9 M and 0.201 × 10−9 M, respectively. On the other hand, IMBH was successfully utilized for the quantitative analysis of Cu2+ and Fe2+ ions in real water samples and logic gate construction. In addition, optoelectronic and structural properties of the IMBH and Fe(II) and Cu(II) complexes were determined by solvent phase DFT calculations.