Currently, CO2 flooding is the most promising carbon capture, utilization, and storage (CCUS) technology in the energy industry. Understanding the nanoconfinement effect on the CO2-oil miscible process is crucial for accurately determining the minimum miscibility pressure (MMP) of CO2/oil in shale reservoirs. In this study, we conducted molecular dynamics (MD) simulations to investigate the effects of pore size, surfactants, and pore type on the MMP of nanoconfined CO2/shale oil/surfactant systems. Validations against experimental data show a deviation of 2.98 % in the CO2 MMP. The MMPs under nanoconfinement are found to be significantly lower than those in bulk phase conditions (up to 22.94 %). The simulation results reveal that decreasing pore size can enhance the miscibility of CO2 and oil by increasing the CO2 adsorption ratio, improving CO2-surfactant interactions, and inhibiting the tendency of CO2 molecules to self-aggregate. The enhancement of CO2-oil miscibility caused by surfactants is ranked by CFP > SF > SDS according to the mixing degrees (Dmix) and the spatial distribution of CO2 around surfactant molecules. In addition, pore type exhibits various abilities in influencing the MMP, owing to their different mineral surface properties and ability to influence CO2-surfactant interactions. Nanopores with stronger hydrophobicity and a denser CO2 distribution around surfactant molecules have lower MMPs. The results show that the order of MMP in terms of pore types is Quartz < Kaolinite < I/M clay. This study elaborates the micro-mechanisms of surfactant-assisted CO2-oil miscibility under nanoconfinement, offering valuable insights for effectively designing CO2 miscible flooding in shale oil reservoir development.