The Ru atomic catalyst-doped GaN (Ru-GaN) model was established by density functional theory (DFT), and the adsorption models of transformer oil dissolved gas (CO, H2, CH4, C2H2, C2H4 and C2H6) by a Ru-GaN monolayer were optimised. From the adsorption energy, differential charge density, electron state density, molecular orbital and desorption properties, the modification mechanism of Ru-GaN and the gas-sensitive response mechanism of Ru-GaN to CO, H2, CH4, C2H2, C2H4 and C2H6 were systematically studied. The introduction of metal Ru increases the defect state of GaN to provide the active site for the adsorption of gas molecules and reduces the adsorption barrier of GaN to gas molecules. The results show that Ru metal-doped GaN can adsorb CO, C2H2 and C2H4 by chemisorption, with Eads of −2.068 eV, −2.422 eV and −1.877 eV and Qt of −0.1696 e, −0.0671 e, −0.1222 e. In addition, charge redistribution leads to changes in the density of states, molecular orbitals and the conductivity of CO, C2H2 and C2H4 adsorption systems, indicating excellent gas sensitivity to the three gases. The desorption time further verified that Ru-GaN is an ideal CO and C2H2 gas scavenger and a recyclable material for C2H4 gas sensors.