The division process used in a DFB diode laser-based optical gas sensor was studied to improve the immunity to laser power variation. Residual amplitude modulation (RAM) in wavelength modulation spectroscopy (WMS) detection was eliminated by intensity normalization using a division process. As a result the detected harmonic signals showed a significant improvement in line shape. For the first harmonic (1f
) signal, Bias was improved from 38.7% to 1.2%; Baseline Difference was improved from 2.7% to 0.69% and Asymmetry was improved from 15.4% to 0.22%. For the second harmonic (2f
) signal, the Asymmetry Coefficient was improved from 103% to 5.1%. Moreover the division process can further suppress the influence of unstable laser power. As a result, for the 1f
signal, stable detection with a variation coefficient of 0.59% was obtained over a wide dynamic range (0.38–8.1 mW). For the 2f
signal, stable detection with a variation coefficient of 0.53% was obtained from 0.64 mW to 8.27 mW. The test results showed a good agreement with the theoretical analysis and the proposed method has considerable potential application in gas sensing.