The ring transformation is a powerful procedure for the preparation of polyfunctionalized compounds, which are not easily available by reported methods. 3-Methyl-5-nitropyrimidin4 (3H) -one (3) has a suitable structure for this purpose to cause three types of ring transformations. When the reaction proceeds at 2- and 6-positions of 3, 3, 5-difunctionalized 4-pyridones 7, 4, 5-disubstituted pyrimidines 8, functionalized 4-aminopyridines 17 can be obtained. The reaction at 4- and 6-positions of 3 affords 5, 6-disubstituted 3-nitro-2-pyridones 9. Pyrimidinone 3 behaves as a synthetic equivalent of activated diformylamine 4 in the former case, and as that of α-nitroformylacetic acid 10 in the latter case. The control of the selectivity of the above reactions is also discussed. Since all of the reactions are performed with simple experimental manipulations, the present ring transformations are useful methods for the preparation of functionalized azaheterocyclic compounds.