Two complexes [Co(L) 2 Á2CH 3 OH] 2 Á(NO 3 ) 4 (1) and [Cd(L) 2 (NO 3 ) 2 ] (2) (L = 2-(2-imidazolyl)-4-methyl-1,2-dihydroquinazoline-3-oxide) were synthesized by natural evaporation of Co (II)/Cd (II) nitrate with a new heterocyclic ligand. The metal complexes are characterized by elemental analysis, spectroscopy, and X-ray crystallographic. In the crystal structures, Co (II) complex 1 was in a six-coordinated coordination environment and constituted an infinite 1-D chain, 2-D network, Meter-shaped 3-D supramolecular framework, while Cd (II) complex 2 assembled into an infinite 1-D, wave-like 2-D, and dragonfly-shaped 3-D skeleton. Specifically, nitrate ions were present as a dissociated group in complex 1, whereas complex 2 was involved in the coordination. Moreover, Cd (II) complex exhibited different fluorescence behaviors in diverse solvents. Remarkably, all the compounds have shown perceptible antibacterial activity against Gram-positive and Gram-negative bacteria. Furthermore, the electrostatic potential (ESP) calculations were utilized to analyze electrophilic and nucleophilic attack sites on the molecule, which verified the existence of hydrogen bonds in the optimized crystal structure. In addition, the structural features of metal complexes have been remarkably rationalized, and the overall trends obtained in the experimental values have been resoundingly remade by TD/DFT calculations. The detailed Hirshfeld surface analysis and fingerprint plots yielded a comparative picture of the mode of non-covalent interactions.