In this paper, the wavelength modulation spectroscopy (WMS) technique is modified and used for measuring methane with large absorbance. WMS has been frequently used for gas measurement and relies on the linear relationship between the second harmonic amplitude and the gas volume concentration however, the conventional WMS technique is only applicable for gases whose absorbance is much smaller than 1, which is because of the first-order approximation to Lambert-Beer's law in the derivation of the traditional WMS theory, but the first-order approximation holds only at low absorbance, hence the linear relationship between the second harmonic and the gas concentration does not hold at large absorbance. In the modified WMS in this paper, there is no need to make any approximation to Lambert-Beer's law. The measurement light is absorbed by the gas to be measured and then collected by the photodetector, and the reference light is directly detected by another photodetector without being absorbed, and the output signals of the two photodetectors are transmitted to the computer after analog-to-digital conversion. In this way, the demodulated second harmonic signal remains linear with the gas concentration even at large absorbance. In this paper, the traditional WMS theory and the modified WMS theory are introduced, and a series of methane with concentration gradients are measured separately to compare the experimental results of the traditional WMS and the modified WMS. It is confirmed that the linearity in the traditional WMS theory no longer holds under large absorbance, but the improved WMS can still guarantee the linear relationship between the second harmonic and the methane concentration, which verifies the advantages of the modified scheme. Finally, through Allen's standard deviation analysis, we obtained that the stability of this methane measurement system reaches the optimum at the average time of 103.6s, and the corresponding Allen's standard deviation is 26.62 ppbv.