The porosity and pore size distribution of shale within the oil window before and after solvent extraction are important for estimating the total oil content, understanding storage and migration pathways, and the location and accessibility of hydrocarbons. However, the changes in porosity and pore size distribution of shale before and after extraction are complicated, and the mechanism is not well understood. The x-ray diffraction, Rock-Eval pyrolysis, field-emission scanning electron microscopy, and low-pressure gas adsorption were conducted to investigate the geochemistry and pore structures of extracted and nonextracted shale samples from the Yanchang Formation in the Ordos Basin, China. The extractable organic matter (EOM) in the samples includes hydrocarbons in pores and adsorbed on organic matter (OM) and minerals, and soluble porous or nonporous solid OM. The total pore volume and specific surface area (SSA) generally increased in the extracted samples. However, decreased pore volume at some pore size ranges in several extracted samples was observed, and there were differences in the incremental pore volume, SSA, and pore size distributions. The removal of liquid hydrocarbons from organic or inorganic pores, adsorbed EOM, and soluble porous or nonporous solid OM causes differences in changes in pore volume, SSA, and pore size distribution. The fractions of adsorbed EOM and soluble porous and nonporous, solid OM should be subtracted to avoid overestimating the total oil content. The inorganic pores and siltstone and sandstone laminae may play an important role in hydrocarbon storage and migration, which may be underestimated.