Tectonic controls on near-surface CH4 and CO2 concentrations were investigated by measuring CH4 and CO2 concentrations at the surface and a height of 1.5 m, in the different tectonic units that comprise the northwestern margin of Ordos Block, China, which has a complex tectonic structure and a history of strong earthquakes. CH4 and CO2 concentrations varied from 1905 to 2472 ppb and 397.5 to 458.5 ppm, respectively. Surface CH4 and CO2 concentrations were generally higher than those measured at 1.5 m, but showed similar trends, indicating that the measured CH4 and CO2 predominantly originated from underground gases. The CH4 and CO2 concentrations increased with an increasing strike-slip rate across the faults, and concentrations in the blocks with high internal deformation were much higher than those measured in the stable blocks. Regions of extensional deformation had higher gas concentrations than regions that had experienced compressional deformation. The spatial distribution of CH4 and CO2 at the study site had similar trends to faults associated with the Yinchuan Graben. The results of this study indicated that gas source, gas migration pathway, and tectonic stress were the main factors that influenced gas emission. The key factor is tectonic stress, which controlled the formation of tectonic structures, changed the pathway of degassing, and acted as the driving force for gas migration. The results of this study clarify the mechanism of CH4 and CO2 degassing in faulted regions and suggest that CH4 and CO2 concentrations may be useful precursors in the monitoring of seismic activity. The results may also help inform future assessments of the contribution of geological sources to greenhouse gas emissions.