A mild, green, and facile method for the synthesis of 6,6a-dihydroisoindolo[2,1-a]quinazoline-5,11-dione derivatives is described in high yields using ionic liquids as green media. The method involves the reaction of 2-aminobenzamides with 2-formylbenzoic acid catalyzed by iodine and provides a new alkaloid library with potential activity for biomedical screening.