Power transformer is the hub of power grid energy transmission, and its safe and reliable operation is very important to power grid. In this paper, based on density functional theory, Ti3C2Tx (T = F, O, OH) material was used as sensing material. The adsorption models of Ti3C2Tx and dissolved characteristic gases (H2, CH4, C2H4, C2H6, C2H2, CO, and CO2) in transformer oil are constructed. The adsorption distance, bond length change, adsorption energy, charge transfer and density of states (DOS) of the adsorption system were analyzed. The results showed that the gases can adsorb on the surface of Ti3C2Tx spontaneously. Specifically, CO2, CO, C2H2 and C2H4 exhibit a strong adsorption effect on Ti3C2(OH)2, forming hydrogen bonds or chemical bonds, accompanied by large charge transfer and adsorption energy, indicating Ti3C2(OH)2 shows a good sensing performance for these gases.