An efficient method for N-acylation of amides is described using a pyridine ring as the internal nucleophilic catalyst to give imides in moderate to excellent yields. The methodology provides a facile, air insensitive, and environmentally friendly route to form diversified imide scaffolds, which exist widely in natural products and biologically active materials.