Purpose: The use of heavy machinery in mining areas increases during mining and dumping of waste soils, causing severe soil compaction and potentially affecting soil recovery. This study aimed to capture the features of complex compacted soil pore structure using computed tomography (CT) and to quantify soil pore distribution properties based on Minkowski theory. Materials and methods: A total of 45 cylindrical soil columns were extracted from different soil layer at 5 sampling sites that differed in compaction level in Pingshuo opencast coal mine in Shanxi Province of China. The penetration resistance at these sites ranged from 27.3 to 1023.1 kPa. Three-dimensional reconstruction software VGStudio was used to obtain the morphological characteristics (pore volume density, VD; surface density, SD; mean curvature density, MCD; and Euler number, EN) of soil pores after processing the X-ray scanned image. Results and discussion: Compaction generally reduced VD, SD, and MCD, which ranged from 0.10 to 0.20, 2.23 to 2.80 mm 2 mm −3 , and 10.75 to 15.64 mm mm −3 respectively in undisturbed site P0, whereas, they ranged from 0.02 to 0.07, 0.13 to 0.60 mm 2 mm −3 , and 1.61 to 4.27 mm mm −3 respectively in highly compacted site P4. The three index exhibited the similar trend, and decreased with the increase of compaction level. Soil compaction had positive effects on EN, which was low at the depth of 20- to 40-cm layers but showed an increasing trend with increasing soil compaction level. The value of EN varied from 28,878 to 129,861 in P0, whereas it varied from 1,169,967 to 2,281,998 in P4. Conclusions: All of macroporosity, mesoporosity, and microporosity were significantly affected by heavy machinery compaction, among which macroporosity exhibited the maximum decrease in P4 compared to that in P0 (P0 ranged from 14.2 to 26.4% and P4 ranged from 0.2 to 1.4%). The soil compaction in mining area significantly affected soil properties, thus artificial methods such as fertilizer application and deep tillage were needed.