The closed pores in coal seams influence the storage of coalbed methane. The investigation of closed pores characteristics for coals is of great significance in improving the production of coalbed methane and revealing the mechanism of coal and gas outburst. However, due to limitations in analytical techniques, the characteristics and evolution mechanism of closed pores in coals with different ranks are not sufficiently understood. In this paper, eight coal samples with different ranks were collected and characterized by small-angle X-ray scattering (SAXS) and low-temperature nitrogen adsorption (LTNA). The open and closed pores of coals with various ranks were studied, and the mechanism for evolution of closed pores during coalification was proposed. The results show that among eight coal samples with different ranks, the closed porosity of low-metamorphic coals is relatively lower, the closed porosity of medium-metamorphic coals is in the middle, and the closed porosity of high-metamorphic coals is relatively higher. The change in closed porosity for coals with different ranks may be related to varieties of the molecular structure of coals. The low-metamorphic coals have more disordered arrangement of molecular structure and easily form connected pores. Therefore, the closed porosity in low-metamorphic coals is low. The aromatization of medium-metamorphic coals turns aliphatic chains into closed aromatic rings, and the closed porosity of these coals also increases. When coals reach a high degree of metamorphism, polycondensation compacts the coal macromolecular structure, providing for easy formation of closed pores between aromatic condensed rings, so the closed porosity is obviously increased in high-metamorphic coals. This study has dual significance in advancing the understanding of open and closed pores in coals and the mechanism of coal and gas outburst.