Pore wettability plays a key role in controlling shale gas adsorption and flow in marine shales. To reveal the mechanism of shale gas adsorption and flow in pores with different wettability (hydrophobic or hydrophilic), molecular modelling is simulated using the molecular dynamics method. Three pore assemblages, namely, the quartz–illite (Q–I) pores, the quartz–organic matter (Q–OM) pores, and the illite–organic matter (I–OM) pores, are proposed and the adsorption and diffusion behavior in these pores are simulated under different conditions. The results show that matrix compositions in shale greatly affect pore wettability. Water molecules preferentially absorb on the junction of materials and result in more hydrophilicity at the junction than pores. Methane density simulations reveal that free methane molecules form clusters in the Q–I pores, with higher free methane density than adsorbed methane. Methane molecules in the Q–OM pores are primarily adsorbed on organic matter. Free methane molecules extensively exist in the I–OM pores, leading stronger density of free methane than adsorbed methane. The more the proportion of free methane, the larger the methane self‐diffusion coefficient. This study provides new insights to understanding of shale gas adsorption and diffusion behavior, which is important for the effective development of shale gas reservoirs.