Abstract The microscopic pore-fracture structure and wettability have a significant influence on the two-phase seepage of shale gas and water. Due to the limitation of experimental conditions, the seepage patterns of gas and water in shale pores and slits under different wetting conditions have not been clarified yet. In this study, the three-dimensional digital rock models of shale inorganic pores, organic pores, and microfractures are established by focused ion beam-scanning electron microscopy scanning, and gas-driven water seepage simulation in shale microscopic pore-fracture structure under different wetting conditions is carried out based on volume of fluid method. The simulation results show that the gas–water relative permeability curves of microfractures are up-concave, and the gas–water relative permeability curves of inorganic and organic pores are up-convex; the gas–water two-phase percolation in microfractures is least affected by the change of wettability, the gas–water two-phase percolation in inorganic pores is most affected by the change of wettability, and the organic pores are in between; the gas–water two-phase percolation zone of microfractures is the largest, and the isotonic saturation is the highest; under the water-wet conditions, the critical gas saturation of microfractures, inorganic pores, and organic pores are 0.13, 0.315, and 0.34, respectively, and the critical gas saturation of organic pores under non-water-wet conditions is 0.525, indicating that under water-bearing conditions, the shale gas flow capacity in water-wet microfractures is the strongest, followed by water-wet inorganic pores, water-wet organic pores, and hydrophobic organic pores, respectively.