The way is dependent on the selected metal. Metal nitrates at high temperature are unstable and decompose with formation of either nitrite, oxide or pure metal. Apparently, you should first completely reduce the metal and after that realize reaction for formation of nitride.