To investigate the adsorption and migration behavior of oxygen in coal gangue with different pore sizes, this study characterizes the multiscale morphology of coal gangue pores and fractures using SEM NMR, and low-temperature N2 (77 K) adsorption methods. As well, the study simulates the adsorption and diffusion behavior of O2 within the pore structures of coal gangue based on GCMC and MD methods. The study examines the oxygen adsorption characteristics across different pore sizes and analyzes the mass transfer mechanisms during oxygen diffusion. Results indicate that the pores in coal gangue are predominantly micropores within the 1–10 nm range. As pore size increases, the absolute adsorption amount of oxygen increases while the isosteric heat of adsorption decreases. The isosteric heat of adsorption in coal gangue models with different pore sizes is less than 42 kJ/mol, indicating the physical adsorption of oxygen within the pores. Oxygen shows adsorption layering perpendicular to the coal gangue surface, with adsorption density distribution differences decreasing and adsorption capacity weakening as pore size increases. The O2 adsorption isotherms in coal gangue follow Langmuir adsorption principles, with oxygen saturation adsorption decreasing as absolute adsorption increases. The confinement effect of coal gangue on oxygen weakens as pore size increases, and the impact of increasing pore size on oxygen diffusion is stronger than adsorption. These findings are significant for understanding the microscopic adsorption and diffusion behavior of O2 in coal gangue pores and fractures and are crucial for accurately preventing and managing spontaneous combustion in coal gangue piles.