Lead compounds containing nitrogen pharmacophores from natural resources have garnered interest among researchers due to their potential for drug development. However, the extractions of the active metabolites are usually labor-intensive and time-consuming. In this study, halogenated vanillin derivatives featuring azo dyes (N=N) (1a-1 h) and Schiff base (C=N) (2a-2 h) have been synthesized via diazonium coupling and nucleophilic substitution reaction, respectively. The comparative effect of N=N and C=N moieties was evaluated for antibacterial properties against Staphylococcus aureus and Escherichia coli via disc diffusion method. Incorporating C=N (8–13 mm) into the vanillin network showed excellent inhibition against S. aureus compared to N=N (7–8 mm) and the standard ampicillin (12 mm). While the halogenated vanillin featuring N=N (7–9 mm) and C=N (7–8 mm) moieties showed excellent zone of inhibitions against E. coli compared to the parent vanillin. The in-silico screening using AutoDock Vina, showed 2c-h (inhibition zone > 10 mm) with a high binding affinity against DNA gyrase enzyme with binding energy ranging from − 7.3 to − 7.9 kcal/mol, similar to re-docking of ampicillin − 7.6 kcal/mol and co-crystalize compounds BPH651 with − 7.5 kcal/mol. This research contributes a significant milestone in drug design, especially for the development of new antibacterial drugs with outstanding properties.
Graphical abstract