Coal rock gas (CRG) in the Upper Carboniferous Benxi formation in the Ordos Basin is currently in the early stage of exploration and development, and knowledge regarding the coal rock’s microscopic composition, pore structure, and their controls on gas occurrence remains limited. By using techniques including petrographic microscopy, X-ray diffraction (XRD), micro-CT scanning, low-temperature CO2 adsorption, low-temperature N2 adsorption, high-pressure mercury intrusion, and high-pressure autoclave-gold tube pyrolysis simulation, etc., the maceral composition, industrial component, pore structure, and gas occurrence states in the No. 8 coal seam of the Benxi formation in the study area were investigated. The results show that the No. 8 coal seam is dominated by bright and semi-bright coals, with average vitrinite, inertinite, and exinite contents of 78.8%, 18.2%, and 1.0%, respectively. The coal rock exhibits an average fixed carbon content of 70.00% and an ash content of 13.90%, indicative of low-ash coal. The micropores, mesopores, and macropores contribute 75.7%, 14.4%, and 9.9% to the total pore volume, respectively, while their specific surface area proportions are 98.3%, 1.0%, and 0.7%, respectively. The micropores contribute the most to both total pore volume and specific surface area. The adsorbed gas and free gas account for 74.7% and 25.3% of the total gas content, respectively. The adsorbed gas content is positively correlated with micropore volume and micropore specific surface area, while the free gas content shows an approximately positive correlation with macropore volume.