The paper object is high-quality Shenmu bituminous coal modified by fatty alcohol polyoxyethylene ether sodium sulfate (AES) surfactant. The changes in functional groups, free radicals, Zeta potential, and contact angle of coal modified in AES anionic surfactant were analyzed. Based on the molecular structure of Shenmu coal, a coal-AES-water three-phase dynamic model was constructed. The wetting mechanism of coal was studied by molecular dynamics. The research has demonstrated that as the mass fraction of AES surfactant increases, the proportion of polar groups (-OH, C–O–C, –COOH, –CO), free radical content and Zeta potential increased significantly. The size of contact angle displayed a major negative linear correlation with the proportion of polar groups and free radicals, but positively linearly correlated with the Zeta potential. In the coal-AES-water three-phase dynamic model, the AES molecules adhere to coal molecules as hydrophobic group, while hydrophilic groups extended into the water. This increased H2O diffusion coefficient, enhanced action energy between coal and water interface, decreasing surface tension and achieving effective wetting of the coal. This paper supplies s a new idea for selecting efficient surfactants to change the coal microstructure. It is of major importance for improving coal wettability and offers a theoretical foundation for gas drainage and disaster prevention.