Novel benzimidazoles, benzothiazoles, and benzoxazoles linked to N-arylacetamide were synthesized in good yields by reacting a series of 2-oxo-2-(arylamino)ethyl 4-formylbenzoates with o-phenylenediamine, 2-aminothiophenol, or 2-aminophenol in ethanol at reflux in the presence of NaHSO3. Attempts to use the new aldehydes as adaptable precursors for the synthesis of fused dihydropyran or fused dihydropyridine via Michael or Hantzsch's reactions were unsuccessful; instead, the processes produced the corresponding arylidene derivatives. The structures of the novel compounds were verified with a variety of spectra. All synthesized compounds were evaluated for antibacterial activity against four different bacterial strains. Compound 6a had good activity against Escherichia coli in an agar diffusion assay, with an inhibitory zone width of 30 mm compared to ofloxacin (20 mm). Compounds 18a and 18b were most effective against Bacillus subtilis, with MICs of 156.3 and 312.5 µg/mL, respectively. Molecular docking investigations demonstrated that compounds 6a, 18a, and 18b had high binding affinities for bacterial tyrosyl-tRNA synthetase and DNA gyrase.