In this study, the hydrophobic modification of coal gasification fly ash (FA) was investigated given the adverse effects of surface hydrophilic structures on the material field. The surface of FA was modified using stearic acid (SA), which successfully altered its hydrophilic structure. When the contact angle of S-FA increased from 23.4° to 127.2°, the activation index increased from 0 to 0.98, the oil absorption decreased from 0.564 g/g to 0.510 g/g, and the BET-specific surface area decreased from 13.973 m2/g to 3.218 m2/g. The failure temperature of SA on the surface of S-FA was 210 °C. The adsorption mechanism of FA was analyzed using density functional theory (DFT) and molecular dynamics (MD). The adsorption of water molecules by FA involved both chemical and physical adsorption, with active adsorption sites for Al, Fe, and Si. The adsorbed water molecules on the surface of FA formed hydrogen bonds with a bond length of 1.5–2.5 Å, leading to agglomeration. In addition, the long alkyl chain in SA mainly relied on the central carbon atom in the (-CH3) structure to obtain electrons in different directions from the H atoms in space, increasing the Coulomb repulsion with the O atoms in the water molecule and thereby achieving the hydrophobic effect. In the temperature range of 298 K to 358 K, the combination of FA and SA became stronger as the temperature increased.