CO2 applications for enhanced oil recovery and storage in continental shale reservoirs are promising, and there is a need to evaluate the impact of porous structure on oil–water two-phase flow under CO2 environment. In this study, first, digital cores of quartz-rich, carbonate-rich, and clay-rich shales are established using Focused Ion Beam Scanning Electron Microscopy scanning data processed through generative adversarial networks. Subsequently, the pore networks generated by digital cores are quantitatively analyzed using the generalized extreme value distribution. Finally, pore network modeling is carried out to elucidate the effect of porous structural differences on oil–water flow considering CO2 dissolution and capillary forces. The results show that quartz-rich shale, characterized by nanopore intergranular dominance and the highest pore network connectivity, demonstrates the highest relative permeability of the oil phase. Carbonate-rich shale exhibits intermediate relative permeability of oil phase, while clay-rich shale exhibits the worst. The dissolution of CO2 reduces oil–water interfacial tension and oil viscosity, enhances oil mobilization within nanopores, and notably increases the relative permeability of the oil phase. The permeability of the oil phase is governed by pore structure, displaying positive correlations with core heterogeneity, pore radius, coordination number, and throat length, and negative correlations with throat radius.