Since 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 work, Ti
3C
2T
xsamples are prepared by etching Ti
3AlC
2with different etching agents for the solutions of HF and LiF/HCl. The effects of etching agents on the structure and gas sensing properties of Ti
3C
2T
xmaterials are studied by scanning electron microscopy (SEM), X-ray photoelectron spectroscopy (XPS), and gas sensing properties analysis. The material structure analysis shows that both HF and LiF/HCl etching agents have good etching effect on Ti
3C
2T
xmaterial. The results of gas sensing properties show that the gas sensing properties of Ti
3C
2T
xprepared by LiF/HCl etching agent is better than by HF etching agent, and the wide range, high sensitivity and high stability of NH
3detection can be achieved at room temperature. The analysis shows that the high sensing performance of Ti
3C
2T
xprepared by LiF/HCl solution etching is mainly due to the high proportion of —O and —OH functional groups on the surface of Ti
3C
2T
x. The experimental studies can lay a theoretical foundation for studying the gas sensing and practical application of Ti
3C
2T
xbased sensor.