Compared to the most commonly used on-chip direct absorption spectroscopy (DAS) gas detection technique, the second harmonic (2 f ) based on-chip wavelength modulation spectroscopy (WMS) proposed by our group has the faculty to suppress noise and improve performance, but the accuracy of 2 f WMS is easily affected by optical power variation. A mid-infrared auto-correction on-chip gas sensor based on 2 f /1 f WMS was proposed for decreasing the influence of the variation of optical power. The limit of detection of methane (CH 4 ) obtained by a chalcogenide waveguide with a length of 10 mm is 0.031%. Compared with the 2 f WMS, the maximum relative concentration error of the auto-correction on-chip gas sensor was decreased by ∼5.6 times. The measurement error is ≤2% in a temperature variation range of 30°C. This auto-correction sensor without a complicated manual calibration is helpful to the high accuracy measurement for on-chip integrated gas sensing.