We use computer modeling to investigate the mechanism of atomic-scale corrugation in frequency-modulation atomic force microscopy imaging of inorganic surfaces in solution. Molecular dynamics simulations demonstrate that the forces acting on a microscope tip result from the direct interaction between a tip and a surface, and forces entirely due to the water structure around both tip and surface. The observed force depends on a tip structure and is a balance between largely repulsive potential energy changes as the tip approaches and the entropic gain when water is sterically prevented from occupying sites near the tip and surface.