Ethyl 5-arylpyridopyrimidine-6-carboxylates 3a–d were prepared as a one pot three component reaction via the condensation of different aromatic aldehydes and ethyl acetoacetate with 6-amino-1-benzyluracil 1a under reflux condition in ethanol. Additionally, condensation of ethyl 2-(2-hydroxybenzylidene) acetoacetate with 6-amino-1-benzyluracil in DMF afforded 6-acetylpyridopyrimidine-7-one 3e; a facile, operationally, simple and efficient one-pot synthesis of 8-arylxanthines 6a–f is reported by refluxing 5,6-diaminouracil 4 with aromatic aldehydes in DMF. Moreover, 6-aryllumazines 7a–d was obtained via the reaction of 5,6-diaminouracil with the appropriate aromatic aldehydes in triethyl orthoformate under reflux condition. The synthesized compounds were characterized by spectral (1H-NMR, 13C-NMR, IR and mass spectra) and elemental analyses. The newly synthesized compounds were screened for their anticancer activity against lung cancer A549 cell line. Furthermore, a molecular-docking study was employed to determine the possible mode of action of the synthesized compounds against a group of proteins highly implicated in cancer progression, especially lung cancer. Docking results showed that compounds 3b, 6c, 6d, 6e, 7c and 7d were the best potential docked compounds against most of the tested proteins, especially CDK2, Jak2, and DHFR proteins. These results are in agreement with cytotoxicity results, which shed a light on the promising activity of these novel six heterocyclic derivatives for further investigation as potential chemotherapeutics.