The co-chloroalkylation of 2-substituted quinazolin-4(3H)-one derivatives 1 and 2 with Br-(CH2)(n)-Cl (n = 2-4) and the intramolecular imidate-amide rearrangement of the alkylated products are described. At room temperature, the 2-phenyl substituent promoted O-alkylation, whereas the less steric 2-benzyl group led to a higher ratio of N-alkylation. The investigation of the O-alkylated products, 4-omega-chloroalkoxyquinazolines, revealed that the migration of omega-chloroethyl and omega-chloropropyl groups from oxygen to nitrogen should be intramolecular via five- and six-membered cyclic 1,3-azaoxonium intermediates, respectively. Competition between rearrangement and nucleophilic substitution results in the formation of 7a,b and 8a,b from the nucleophilic substitution of 4a,b and 6a,b, respectively.