Refluxing aminocarboxamide (I) with triethyl orthoformate afforded the pyridothienopyrimidine (II). Then, treatment of (II) with PCl5 and POCl3 yielded the corresponding chloro derivative (III). Finally, the title compound was obtained by substitution of the chloro group with N-(4-acetylphenyl)piperazine (IV) in refluxing ethanol.