This subject mainly researches and simulates the detection method of gas environment by TDLAS gas detection technology. At present, the design of the underground pipe network is relatively complex, which often requires a lot of manpower and financial resources to maintain, and occasionally the corresponding leaked data cannot be detected or transmitted in time. However, if the gas concentration can be detected by TDLAS technology, the corresponding leak points can be found in time. It is directly transmitted to the corresponding host computer through the optical fiber perception, so that the inspectors can find the leakage in time. This subject mainly studies and simulates the application of TDLAS direct absorption method for gas detection, which can accurately measure the methane concentration in the gas environment. Corresponding coordination is mainly carried out through the semiconductor laser, the adjusted signal is injected into the gas chamber environment, and the concentration of the gas in the corresponding environment is calculated by comparing the changes of the light intensity before and after, so that the concentration change of a corresponding gas environment can be fed back.