The viscosity and density of different gases (CO2 and N2) vary with the gas species, composition and temperature, which may raise variant results of gas injection enhanced coalbed methane (ECBM) extraction. The fluid–structure interaction within the coal seam was established to study the evolution of coal strain in the process of ECBM extraction by injecting CO2 or N2. After verifying the equations governing the interaction via experimental tests, the ECBM extraction by injecting different gases was simulated. The characteristics of coal strain induced by gas sorption was comprehensively analyzed. Results show that N2 has strong fluidity in coal fractures, leading to wider influencing range of injected N2 than that of injected CO2. Due to the greater affinity of CO2 to coal, the effect of gas displacement and competitive sorption is more obvious, manifesting in more likely to migrate towards the coal matrix. Compared with regular extraction, the CH4 content at 180d in CO2-ECBM and N2-ECBM extraction has decreased by 24.3% and 13.8%, respectively. The effect of gas extraction is CO2-ECBM > N2-ECBM > regular extraction. The coal strain induced by gas sorption mainly depends on the proportion of adsorbed gas in the coal matrix. The permeability evolution is opposite to the coal strain induced by gas sorption. For CO2-ECBM, the proportion of CH4 decreases gradually caused by the competitive sorption with CO2 in matrix, and the coal strain increases. The influencing factors on the coal strain are injection pressure, initial permeability, water saturation and extraction pressure in order. While for N2-ECBM, the influencing factors on the coal strain are initial permeability, injection pressure, water saturation and extraction pressure in order.