First‐principles calculations are used to research the adsorption behavior of ammonia on Ti3C2O2, Ti3C2F2, Ti3C2H2, Ti3C2S2, and Ti3C2Cl2. Herein, a total of four special adsorption sites α, β, γ, and δ are considered. The adsorption energy, charge transfer, and electronic properties of the gas‐adsorption system are calculated, and the better adsorption sites and adsorption functional groups of ammonia on Ti3C2T
X
with different functional groups are studied. The results show that the best adsorption positions of ammonia on Ti3C2O2, Ti3C2F2, Ti3C2H2, Ti3C2S2, and Ti3C2Cl2 are all α position. According to the analysis of differential charge density, adsorption energy, and charge transfer of ammonia molecules, the adsorption strength of ammonia molecules on Ti3C2 surfaces modified with different functional groups is Ti3C2H2 > Ti3C2O2 > Ti3C2F2 > Ti3C2S2 > Ti3C2Cl2. The ammonia molecule adsorbs on the surface of Ti3C2H2 exhibits the strongest adsorption energy (−0.787 eV), but the −H group is more likely to break and form other groups. Therefore, the Ti3C2 surface modified by −O group is more suitable for ammonia detection.