With the discovery of graphene materials, two-dimensional materials have been widely recognized and gradually applied. Two-dimensional transition metal carbides (MXenes) have better mechanical, magnetic and electrical properties than traditional two-dimensional materials. In this paper, Ti3C2Tx samples were prepared by etching Ti3AlC2 with different etching agents for the solutions of HF and LiF/HCl. The effects of etching agents on the structure and gas sensitive properties of Ti3C2Tx materials were studied by scanning electron microscopy (SEM), X-ray photoelectron spectroscopy (XPS) and gas sensitive properties analysis. The material structure analysis shows that both HF and LiF/HCl etching agents have good etching effect on Ti3C2Tx material. The results of gas-sensitive properties show that the gas-sensitive properties of Ti3C2Tx prepared by LiF/HCl etching agent is better than that of HF etching agent, and the wide range, high sensitivity and high stability of NH3 detection can be achieved at room temperature. The analysis shows that the high sensing performance of Ti3C2Tx prepared by LiF/HCl solution etching was mainly due to the high proportion of -O and -OH functional groups on the surface of Ti3C2Tx.The experimental studies can lay a theoretical foundation for the gas sensing research and practical application of Ti3C2Tx based sensor.