Herein we report a hitherto novel multicomponent reaction involving pyridine and its derivatives, aryl diazoesters and N-alkylmaleimides (2 equivalents), using a blue LED under neat (solvent-free) conditions and in the absence of any metal catalysts or bases at r. t. to generate densely substituted itaconimides. This environmentally sustainable strategy generated the desired products in excellent yields. The reaction involved the carbene formation of aryl diazoesters from a blue LED and a subsequent generation of pyridine ylides. The pyridine ylides underwent [3 + 2] cycloaddition with N-alkyl maleimides followed by oxidation, subsequent ring opening of the [3 + 2] adducts and finally reaction with another molecule of N-alkyl maleimides to afford the desired itaconimide derivatives. The reaction has wide functional group tolerance at the aryl moiety of the diazoesters and also on pyridine. Control experiments and DFT studies were used to elucidate the reaction mechanism. © 2022 The Royal Society of Chemistry.