3-Methyl-5-nitropyrimidin-4(3H)-one reacted with enaminones to cause the ring transformation leading to functionalized 4-aminopyridines. Various kinds of amino groups can be introduced at the 4-position by modifying the enaminones. The modification of its vicinal positions was also possible. In addition, a bicyclic pyridine could be synthesized by making use of the vicinal functionality of a 4-aminopyridine-3-carboxylic acid.