Pyrimidines and pyrimidine bearing indole derivatives are very important species in organic chemistry due to their wide use as bioactive compounds with a broad range of good biological activities. Due to the wide spread of different species of bacteria and fungi nowadays, in the present work, a novel series of indolyl‐pyrimidines (2–13) were synthesized starting from 3‐chloro‐1H‐indole‐2‐carbaldehyde (1). Elemental analysis, IR, 1H‐NMR, 13C‐NMR, and mass spectral data elucidated the structure of newly synthesized compounds. All compounds were screened for their in vitro antibacterial and antifungal activity, and they demonstrated promising results; all the new compounds synthesized from compound (1), which allowed reactions with thiourea and ethyl cyanoacetate, gave the target compound (2), which was used as a precursor for the synthesis of indolylthiazolopyrimidine derivatives (3–8) by reactions with halocarbonyl compounds such as chloroacetone, phancyl bromide, and chloroacetic acid through alkylation of the mercapto group followed by cyclization through a nucleophilic attack. When compound (2) subjected to react with hydrazine hydrate gave 4‐indolyl‐2‐hydrazinopyrimidine (5), the latter compound, when allowed to react with ethyl chloroacetate or diethyloxalate, gave indolylpyrimidotriazine derivatives (10,11); in contrast, when the compound reacted with acetic anhydride or formic acid, it gave triazolopyrimidine derivatives (12, 13).