Adding surfactants in fracturing fluids is a practical method for enhancing spontaneous imbibition of shale oil reservoirs. However, both positive and negative observations are found in the field practice. The mechanisms of different types of surfactants for enhancing spontaneous imbibition still need further investigation. In this work, we applied the nuclear magnetic resonance technique to measure the fluid distributions in shale pores during the spontaneous imbibition process. We found that surfactants mainly recover oil in the macropores but have less impact on the production of oil in the micropores. Combining with scanning electron microscopy, high-pressure mercury intrusion, and X-ray diffraction experiments, the pore structure and mineral composition of shales are carefully analyzed. We observed that the surfaces of large pores are mostly quartz and feldspars, while the surfaces of small pores are organic matter and clay. The wettability of a shale rock is a key factor affecting spontaneous imbibition; moreover, various minerals that make up the shale have different wettability. Therefore, we performed the contact angle experiments for the pure mineral chips (quartz, feldspar, calcite, dolomite, clay minerals, etc.) to measure the wettabilities at the initial condition after aging and after being altered by surfactants. The experimental results indicate that surfaces of macropores can be easily altered to be water-wet by surfactants. However, it is not for the micropores, especially for organic matter pores and intracrystalline pores within pyrite framboids. It appears that the anionic surfactant performs better in terms of spontaneous imbibition recovery due to the high efficiency on wettability alteration of clay surfaces.