Abstract The Qiwu Mine is located in the Ten Xian coal field of Shandong province. It experienced repeated volcanic activity, after the coal beds formed, where magma intrusion was significant. The effect of coal reservoir porosity after magma intrusion was studied by analysis of regional and mine structure and magmatic activity. Experimental methods including maceral measurement under the microscope and mercury porosimetry were used for testing the pore structure. The authors believe that magma intrusion into low-rank bituminous coal causes reservoir porosity to gradually increase: the closer to the magmatic rock a sample is, the less the porosity. The pore size distribution also changes. In the natural coal bed the pore size is mainly in the transitive and middle pore range. However, the coal changes to anthracite next to the magmatic rock and larger pores dominate. Regional magma thermal evolution caused coal close to magmatic rock to be roasted, which reduced the volatile matter, developed larger holes, and destroyed plant tissue holes. The primary reason for a porosity decrease in the vicinity of magmatic rock is that Bituminite resulting from the roasting fills the holes that were present initially.