The reaction of 2,4-dichloro-5-(chloromethyl)-6-methylpyrimidine with 4,5-dihydrothiazol-2-amine in chloroform led to the formation of 2-chloro-4-methyl-7,8-dihydro-5H-pyrimido[4,5-d]thiazolo[3,2-a]pyrimidine (3). The true structure of the target compound was confirmed by density functional theory calculations of condensed Fukui indices. The substitution of the 2-Cl function in compound 3 with different secondary amines yielded 2-substituted-4-methyl-7,8-dihydro-5H-pyrimido[4,5-d]thiazolo[3,2-a]pyrimidines in good yields. The assigned products were tested for their potential antibacterial activity and the results indicated that a few derivatives are valuable compounds with great potential to be used as antibacterial agents.