Inorganic carbon dioxide with heavier δ13C values frequently occurs in natural gases or shale gases generated from marine source rocks. To provide a better understanding on the origin of inorganic CO2 associated with hydrocarbon generation, hydrous pyrolysis experiments were conducted utilizing source rocks of different depositional environments and varying carbonate mineral concentrations, at a fixed temperature 350 °C, and lithostatic pressure 50 MPa and fluid pressure 28 MPa for 48 h. Carbon dioxide yields, concentrations in gaseous products, and δ13C values tend to increase in proportion to the carbonate mineral concentrations of the original source rocks. The results showed that carbonate mineral dissolution might be the principal source of inorganic carbon dioxide generated in the experiments. Based on the δ13C values of carbon dioxide produced in the hydrous pyrolysis experiments both in this study and in the literature, we suggest that inorganic CO2 show δ13C values heavier than −8‰, organic CO2 show δ13C values lighter than −16‰, and CO2 with mixed origins show δ13C values ranging from −16 to −8‰. We further discussed the origins of CO2 in the marine Ordovician natural gases of the Ordos Basin, in the marine Miocene CO2-dominated natural gases of the Yinggehai Basin, and in the marine Silurian shale gases of the Sichuan Basin. With a majority of δ13C values higher than −8‰, a major inorganic origin from carbonate mineral dissolution were suggested for CO2 in the natural and shale gases of the above basins.