The investigation of tectonic controls on CH4 and CO2 emissions was conducted by measuring the fluxes of the gases in the different tectonic units along the northwestern margin of the Ordos Block in China, a region renowned for its intricate tectonic configuration. The mean fluxes of CH4 ranged from −1.5 to 1.1 mg m−2 d−1, while CO2 fluxes spanned from 2.0 to 29.2 g m−2 d−1. Notably, the Minqin, Ordos, and Haiyuan blocks primarily exhibited absorption characteristics for CH4. In contrast, within the Hetao and Yinchuan grabens, both degassing and absorption processes coexist. A striking observation was that blocks with high internal deformation exhibited significantly higher CH4 and CO2 fluxes compared to those in the stable blocks. Additionally, regions experiencing extensional deformation demonstrated greater gas emission than those undergoing compressional deformation. The spatial distribution of CH4 and CO2 fluxes at the study points exhibited a similar trend to faults in the Yinchuan Graben. Our findings revealed that CH4 and CO2 are mainly of biogenic origin, accompanied by abiotic emissions from underground. And the gas source, migration pathway, and tectonic stress were the primary factors influencing gas emission, with tectonic stress playing a pivotal role. This stress controlled the formation of tectonic structures, changed the degassing pathway, and served as the driving force for gas migration. The results of this study offer valuable insights into the mechanisms governing CH4 and CO2 emission in faulted regions. Furthermore, our results may contribute to future assessments aimed at quantifying the contribution of geological sources to greenhouse gas emissions.