The pore structure of shale has a significant effect on hydrocarbon migration and the long-term gas supply of shale gas wells. The present study investigates the spontaneous imbibition characteristics to evaluate the pore connectivity and wettability of marine Longmaxi shale samples from the southeastern Chongqing area and continental Yanchang shale samples from the Ordos Basin. The pore-size distribution obtained from N2 adsorption and mercury intrusion porosimetry, field emission–scanning electron microscopy, and focused ion beam–scanning electron microscopy photos are used to interpret the imbibition behaviors. Our results show that the difference in dominant pore type between marine and continental samples, which is dominated by thermal maturity, controls on their imbibition behaviors as well as their wettability. Organic matter (OM) pores within Yanchang samples are poorly developed because of their low thermal maturity, and a large amount of water-wet inorganic pores are preserved in these samples because of relatively weak compaction. Oil-wet OM pores are well developed in Longmaxi samples with higher thermal maturity, and inorganic pores have been largely eliminated because of strong compaction. The low pore connectivity to water for both the Longmaxi and Yanchang samples is indicated by the low water imbibition slopes. Furthermore, the more oil-wet property of the Longmaxi samples and more water-wet characteristics of the Yanchang samples are obtained by comparing the directional water/oil imbibition slopes. In addition, the positive meaning of quartz in the protection of pore spaces is found in both the Longmaxi and the Yanchang samples used in this study.