Fourier transform infrared (FTIR) spectroscopy can be used for fast, sensitive, and non-destructive quantitative analysis of gases. It is essential to extract useful information from the spectra accurately. Therefore, in this paper, a method for analyzing the FTIR spectra of gases is proposed. Savitzky-Golay convolutional smoothing is used to eliminate the noise in the spectra. A modified adaptive smoothing parameter penalized least squares method is used to eliminate baseline drift. Competitive adaptive reweighted sampling is used to select feature variables. Partial least squares regression was used to model the quantitative analysis. The infrared spectra of methane and ethane at different concentrations are obtained experimentally to verify the performance of the proposed method. The experimental results show that the proposed method can achieve smooth denoising and baseline correction of the raw spectra without losing spectral information. The screened feature variables reduce the data volume of the spectra and improve the analysis efficiency. The coefficient of determination for cross-validation (Q 2 ) of the established quantitative analysis model was 0.99995 for the regression result of methane concentration and 0.99906 for the regression result of ethane concentration. The proposed analytical method can improve the accuracy of the FTIR spectral analysis of gases. Meanwhile, the method can also be used in other fields, such as Raman spectroscopy, laser-induced spectroscopy, and mass spectrometry.