The two-dimensional photonic crystal (Ni mesh with square lattice of 10 μm) was prepared and Ni film was thickened to 3 μm by electroplating. Its optical properties and its influence on the infrared absorption of sodium nitrate were investigated. The results show that there is a transmission peak centered at 1 450 cm-1 under normal incidence, and the peak covered the frequencies ranging from 1 300 to 1 500 cm-1, the antisymmetric stretching vibration of nitrate. Moreover, the change of absorption intensities of nitrate’s antisymmetric stretching vibration is essentially consisting with the transmittance of photonic crystal. It indicates that the absorption intensity of sodium nitrate is improved by the modulated infrared light.