Acts as a sensor for nitrate/nitrite and transduces signal of nitrate/nitrite availability to the NarL/NarP proteins. NarQ probably activates NarL and NarP by phosphorylation. NarQ probably negatively regulates the NarL protein by dephosphorylation. ATP + protein L-histidine = ADP + protein N-phospho-L-histidine.