3-Chloroquinoline-2,4-diones react with ethanolamine to give 3-hydroxyethylaminoquinoline-2,4-diones. By reacting with isothiocyanic acid, these compounds cyclize to form thioxoimidazo derivatives. If a benzyl group is attached to carbon atom C-3, it is cleaved off. Simultaneously, molecular rearrangement proceeds through the formation of compounds with quinazoline skeletons. However, when using ethylene diamine, the compounds are subject to new types of molecular rearrangement leading to the formation of new quinazoline derivatives.