A new salicylaldehyde-based sensor N'-(5-bromo-2-hydroxybenzylidene)-4-methylbenzohydrazide (P4) was designed, and its sensing ability towards various metal ions was assessed using UV-visible spectroscopy. The structure of P4 was spectroscopically characterized by UV-Visible, Infrared, 1H-NMR, 13C-NMR spectroscopy and mass spectrometry. UV-Visible absorption spectral study showed selective sensing ability of P4 for Cd2+ and Ni2+ ions in presence of diverse transition metal ions. The results revealed that the detection limit for Cd2+ and Ni2+ was 3.14 µM and 0.92 µM, respectively. Moreover, the compound P4 was fully implemented for detection of Cd2+ and Ni2+ in simulated samples.