An efficient and green protocol for the synthesis of N-aryl maleimide and phthalimide derivatives has been developed.