The pore structure of shale reservoirs leads to the complex phase behavior of shale reservoir fluids, which is aggravated due to changes in fluid composition during reservoir development. Effective prediction of changes in the phase behavior of fluids in shale reservoirs is important. This paper proposes a pore-size-dependent Peng-Robinson equation of state (PR-EOS) to describe phase behavior in nanopores. The approach considers the shift of critical parameters and the gas-liquid capillary pressure and compiles by MATLAB. The verification of the model is satisfying by matching the result with Tnavigator PVTi using the published date. The results show that fluids in nanoscale pores are more likely to exhibit near-critical or condensate states. We also compare the changes in phase behavior when fluids dissolve CO2 and CH4 and observe the phase transition (from gaseous to liquid phase) of the lighter crude oil sample that dissolved more gas during the differential liberation experiment (DL). Finally, we use CO2 pre-pad energized fracturing of a shale oil reservoir in northern China as an example to explain abnormal production performances, such as a majority of light hydrocarbons in the produced fluid of the well during the flow back stage, single gas phase production in the early production stage, and stable gas/oil ratio (GOR) in the process of development. Our novel methodology and phase behavior change mechanism can enhance our understanding of the phase behavior of fluids in shale oil reservoirs during enhanced oil recovery.