Variations in the stable carbon isotope signature of marine carbonate rocks (δ13Ccarb) are utilized as an indicator for changes in depositional environment and tracers of diagenetic alteration. Various petrologic (textural changes) and geochemical indicators (trace elements) have been used to evaluate the effect of diagenetic alteration on the δ13Ccarb signature. However, how diagenetic processes involving interactions between organic matter and minerals impact the δ13Ccarb records of marine carbonate rocks has not been investigated thoroughly. In this study, systematic stable carbon (δ13Ccarb) and oxygen (δ18Ocarb) isotope analyses were conducted on marine carbonates from the Middle Ordovician Majiagou Formation in the Ordos Basin, China to evaluate secondary overprint of the primary δ13Ccarb record. 496 carbonate samples from the gas reservoir (potential gas source rock) were selected from one well located in the natural gas exploration target—mid-east part of the Ordos Basin. A depleted δ13Ccarb excursion (i.e., a shift to more negative values) occurred in the 100 m-thick anhydrite-bearing carbonate sequence of this formation. The δ13Ccarb and δ18Ocarb values for the whole rock vary from −10.9‰ to 1.8‰ and −11.5‰ to −4.0‰, respectively. The calcite veins and vug-filling calcites also have depleted carbon isotope signature ranging between −21.1‰ and −4.4‰. The secondary calcites observed under the microscope were generated by the conversion from isotopically depleted organic matter and resulted in the depleted δ13Ccarb signature. The commonly occurring thermochemical sulfate reduction in the study area and the degradation of potentially enriched carboxylic acid salts in anhydrite-bearing carbonate setting are major factors contributing to the depleted δ13Ccarb values. The conversion from organic carbon to inorganic carbon through organic matter-involved diagenetic processes plays a significant role in explaining the genesis of depleted δ13Ccarb excursions in deeply buried marine carbonate sequences.