The CO2 diffusion effect is an important mechanism of injected CO2 penetrating the reservoir matrix and diffusing into the oil phase during the huff-n-puff (HNP) process. However, the CO2 diffusion coefficient of shale is still uncertain under the reservoir conditions, and the contribution of diffusion to enhanced oil recovery (EOR) needs to be further explored. In this study, the CO2 diffusion coefficient of shale is determined under the simulated reservoir conditions (9–10 MPa, 90 °C) in the laboratory, and the determined CO2 diffusion coefficient is applied in the reservoir numerical model to evaluate the contribution of the CO2 diffusion effect to EOR in the HNP process. First, a radial constant volume diffusion (RCVD) device was built to measure the CO2 diffusion coefficient by the pressure decay method. After that, both the analytical solution and the numerical solution are used to ensure that the result is correct. Finally, a field-scale model consisting of one stage of hydraulic fracture in a shale oil reservoir is established. The effects of reservoir properties such as fracture spacing, fracture half-length, and operational properties of HNP like injection rate, injection time, and soaking time on oil recovery were discussed when the diffusion was included and excluded. The CO2 diffusion coefficient of a shale core is ranging from 1.44 × 10–7 to 5.50 × 10–7 cm2/s, and it is reasonable to be applied in the field reservoir numerical simulation model. According to simulation results, the lower fracture spacing and longer fracture half-length make more CO2 diffuse into the shale matrix, which are critical parameters, to promote the CO2 diffusion effect. When the injection rate is slow and the injection time is short, the CO2 diffusion effect in the reservoir may contribute more to EOR. A high injection rate means sufficient pressure supplement, and the CO2 diffusion effect may become relatively negligible. The soaking time may not be necessary for the EOR of HNP, but the longer soaking time will promote the contribution of CO2 diffusion to EOR, and the incremental recovery is about 0.15–0.26%.