In this paper, we investigate the effect of pore size heterogeneity on fluid composition distribution of multicomponent-multiphase hydrocarbons and its subsequent influence on mass transfer in shale nanopores. The change of multi-contact minimum miscibility pressure (MMP) in heterogeneous nanopores was investigated. We used a compositional simulation model with a modified flash calculation, which considers the effect of large gas–oil capillary pressure on phase behavior. Different average pore sizes for different segments of the computational domain were considered and the effect of the resulting heterogeneity on phase change, composition distributions, and production was investigated. A two-dimensional formulation was considered here for the application of matrix–fracture cross-mass transfer and the rock matrix can also consist of different segments with different average pore sizes. Both convection and molecular diffusion terms were included in the mass balance equations, and different reservoir fluids such as ternary mixture syntactic oil, Bakken oil, and Marcellus shale condensate were considered. The simulation results indicate that oil and gas phase compositions vary in different pore sizes, resulting in a concentration gradient between the two adjacent pores of different sizes. Given that shale permeability is extremely small, we expect the mass transfer between the two sections of the reservoir/core with two distinct average pore sizes to be diffusion-dominated. This observation implies that there can be a selective matrix–fracture component mass transfer as a result of confinement-dependent phase behavior. Therefore, the molecular diffusion term should be always included in the mass transfer equations, for both primary and gas injection enhanced oil recovery (EOR) simulation of heterogeneous shale reservoirs.