New routes for the synthesis of nitrogen-containing heterocycles utilizing cercosporin as a metal-free photocatalyst were developed.