X-ray absorption near-edge spectroscopy, photoluminescence, cathodoluminescence, and Raman spectroscopy have been used to investigate the chemical states of nitrogen dopants in ZnO nanowires. It is found that nitrogen exists in multiple states: N O , N Zn , and loosely bound N 2 molecule. The results establish a direct link between a donor-acceptor pair emission at 3.232 eV and the concentration of loosely bound N 2 . This work confirms that N 2 at Zn site is a potential candidate for producing a shallow acceptor state in N-doped ZnO as theoretically predicted by Lambrecht and Boonchun [Phys. Rev. B 87, 195207 (2013)]. Additionally, shallow acceptor states arising from N O complexes have been ruled out in this paper.