beta-formyl-beta-nitroenamines possess both an electrophilic formyl group and a nucleophilic amino group and, therefore, serve as C3N1 building blocks having a nitro group to afford nitropyridones and aminonitropyridines with a functional group at the 3-position. Upon treatment with malonic acid derivatives or beta-keto esters, nitropyridones were obtained, whereas reactions with functionalized acetonitriles afford aminonitropyridines, via a formal transfer of an alkyl group from the ring nitrogen to the imino group. These procedures provide practical and useful methods for preparation of heterocycles with a nitro group.