Two series of novel 5-arylazo-3-cyano-2-(2″,3″,4″,6″-tetra-O-acetyl-β-d-galacto pyranosyloxy) pyridines and 3-cyano-2-(2″,3″,4″,6″-tetra-O-acetyl-β-d-galactopyranosyloxy) pyridines were synthesized in high yields utilizing a microwave-assisted synthesis tool guided by the principles of green chemistry. The chemical structures of the new substances were confirmed on the basis of their elemental analysis and spectroscopic data (FT-IR, 1D, 2D-NMR). Activity against different bacterial strains was studied. The anticancer potential of the new compounds is also discussed. Molecular docking was used as a tool in this research work to get better insight into the possible interactions, affinities, and expected modes of binding of the most promising derivatives of the potential chemotherapeutic target (DHFR).