In flotation processes, gas molecules adhere to and accumulate on the target mineral surface, forming micro-nanobubbles, which can significantly enhance the efficiency of particle-bubble adhesion. Surfactants are commonly employed as auxiliary agents and play pivotal roles in flotation. However, the effect of surfactant pre-adsorption at the solid–liquid interface on the microscopic process of gas molecule adsorption and accumulation remains unclear. In this study, varying degrees of roughness surface in carbon substrates, the fatty alcohol polyoxyethylene ether (C12EO15), nitrogen molecules (N2), and water molecules (H2O) were employed to construct a gas–liquid–solid model for molecular dynamics simulations aimed at elucidating the underlying mechanisms of N2 molecule adsorption and accumulation on surfactant-modified substrates at the molecular level. The research findings revealed that N2 molecules preferred adsorption in close proximity to carbon atoms along the alkyl chain of the C12EO15 molecule. C12EO15 molecules exhibit a bending and intertwining behaviour on the hydrophobic carbon substrate surface, thereby forming a “network” adsorption layer. An increase in the quantity of surfactants provides abundant adsorption sites for N2 molecules at the solid–liquid interface, consequently augmenting the adsorption capacity of N2 molecules. Nonetheless, the presence of interstitial gaps between the surfactant-formed adsorption sites impedes the diffusion of the N2 molecules at each adsorption locus. This hindrance may obstruct the subsequent generation of micro-nano bubbles at the solid–liquid interface.