In this paper, a new and pragmatic technique has been developed to identify pore types and characterize porosities of shales with various origins. By comparing the genesis of pore types (i.e., organic, brittle, and clay mineral porosities) in shales, the corresponding pore volumes per unit mass are determined as a function of the total porosity, density, and the content of each pore type from core samples. Subsequently, a new inverse framework was proposed and successfully applied to quantify different types of porosities in the Silurian Longmaxi formation shale in the Zhaotong area. The pore volume per unit mass of organic matter is calculated to be around 0.185–0.190 cm3/g, which is 10–21 and 8–19 times more than that of brittle mineral and clay mineral, respectively, indicating that pore space of organic matter contributes greater to the total porosity than that of the clay and brittle minerals. Using single well data, the porosity in organic matter is found to follow the same pattern as the total porosity in the vertical direction. Such an identified porosity type leads to more accurate sweet spots as well as more appropriate drilling locations for horizontal wells in shale reservoirs.