The coal industry contributes significantly to the social economy, but the emission of greenhouse gases puts huge pressure on the environment in the process of mining, transportation, and power generation. In the integrated energy system (IES), the current research about the power-to-gas (P2G) technology mainly focuses on the injection of hydrogen generated from renewable energy electrolyzed water into natural gas pipelines, which may cause hydrogen embrittlement of the pipeline and cannot be repaired. In this paper, considering the scenario of coal districts is rich in coal and renewable energy, and sufficient hydrogen energy can be produced through P2G technology and coal-to-hydrogen (C2H) of coal gasification. In order to transport the mined coal to the destination, hydrogen heavy trucks have a broad space for development, which can absorb hydrogen energy in time and avoid potentially dangerous hydrogen injection into pipelines and relatively expensive hydrogen storage. An optimized scheduling model of electric-gas IES is proposed based on second-order cone programming (SOCP). In the model proposed above, the closed industrial loop between coal mining, hydrogen production, truck transportation of coal, and integrated energy systems has been innovatively studied, to consume renewable energy and coordinate multi-energy. Finally, an electric-gas IES study case constructed by IEEE 30-node power system and Belgium 24-node natural gas network was used to analyze and verify the economy, low carbon, and effectiveness of the proposed mechanism.