With the exhaustion of world energy, new energy has become the most important content of each country’s development strategy. How to efficiently use solar energy has become a research hotspot in current scientific research. Based on surface plasmon resonance and Fabry-Perot (FP) cavity, this paper proposes a design method of asymmetric silicon grating absorber, and uses finite difference time domain (FDTD) method for simulation calculation. By adjusting the geometric parameters, the asymmetric silicon grating absorber realizes two narrow-band absorption peaks with absorption greater than 99% in the optical wavelength range of 3,000–5,000 nm, and the absorption peak wavelengths are λ1 = 3,780 nm and λ2 = 4,135 nm, respectively. When the electromagnetic wave is incident on the surface of the metamaterial, it will excite the plasmon resonance of the metal to form a surface plasmon (SP) wave. When the SP wave propagates along the x axis, the silicon grating can reflect the SP wave back and forth. When the frequency of the SP wave and the incident light are equal, it will cause horizontal FP coupling resonance, resulting in different resonance wavelengths. This paper also discusses the influence of geometric parameters, incident angle and polarization angle on the performance of silicon grating absorbers. Finally, the sensing performance of the structure as a refractive index sensor is studied. The absorber can be used for various spectral applications such as photon detection, optical filtering and spectral sensing.