Both of the coalbed methane (CBM) and shale gas reservoirs are dominated by nanometer‐scale pores with their nanopore structures controlling the occurrence, enrichment, and accumulation of natural gas. Low‐pressure nitrogen gas adsorption (LP‐N2GA), low‐pressure carbon dioxide gas adsorption (LP‐CO2GA), high‐pressure methane adsorption (HPMA), and field emission scanning electron microscope (FE‐SEM) experiments were conducted on 14 different‐rank coal samples and nine Longmaxi shale samples collected from various basins in China to compare their nanopore characteristics. The FE‐SEM results indicate that the pore structures of both the coal and shale samples consist of nanometer‐sized pores that primarily developed in the organic matter. The types of their isothermal adsorption curves are similar. However, the coal and shale samples possess various hysteresis loops, which suggest that the nanopores in shale are open‐plated, whereas those in coal are semi‐open. Furthermore, the specific surface area (SSA) and pore volume (PV) of the micropores in coal are much larger than those of the mesopores, with the micropore SSAs accounting for 99% of the total SSA in the coal samples. However, the micropore SSAs in the shale samples only account 42.24% of the total SSA. These different nanopore structures reflect their different methane adsorption mechanisms. The methane adsorption of coal is primarily controlled by the micropore SSA, whereas that of shale is primarily controlled by the mesopore SSA. If we use mesopore SSA to analyze its impact on methane adsorption capacity of coal and shale, it will be mismatched. However, no mismatching relationship exists between the total SSAs and adsorption capacities of coal and shale. This study highlights the controlling effect of total SSA on methane adsorption capacity.