An efficient and convenient method was developed for the preparation of 2,4(1H,3H)-quinazolinediones and 2-thioxoquinazolinones. Substituted methyl anthranilate reacted with various iso(thio)cyanates in DMSO/H2O without any catalyst or base by using microwave irradiation to generate diversity on the 2,4(1H,3H)-quinazolinediones or 2-thioxoquinazolinones. A variety of substrates can participate in the process with good yields and high purities, making this methodology suitable for library synthesis in drug discovery efforts.