The new compounds (Z)-ethyl 2-cyano-2-(3H- and 2-methyl-3H-quinazoline-4-ylidene) acetate (1 and 2, respectively) were synthesized by multi-step reactions. The structures in a solution have been determined by (1)H-NMR spectroscopy and in the crystal form by X-ray analysis. Molecule 1 crystallized in a primitive monoclinic cell, space group capital ER, P2(1/c). The cell dimensions are a=7.970(6) A, b=7.061(2) A, c=20.537(7) A, beta=97.69(5) degrees , V=1145.3(10) A(3). Molecule 2 crystallized in a triclinic cell, space group P-1, the cell dimensions are a=8.196(5) A, b=8.997(6) A, c=9.435(4) A, alpha=74.22(4) degrees, beta=89.75(4) degrees , gamma=74.07(5) degrees , V=641.9(6) A(3). In both compounds the presence of intra-molecular NH---O=C hydrogen bonding between the nitrogen atom in position 3 of the quinazoline ring and a carbonyl group of the ethyl cyanoacetate residue was proven by quantum-chemical, (1)H-NMR and X-ray methods.