The long-range attractive force or “snap-in” is an important phenomenon usually occurring when a solid particle interacts with a water/gas interface. By using PeakForce quantitative nanomechanics the origin of snap-in in the force curve between the atomic force microscopy (AFM) probe and the water/gas interface of nanobubbles has been investigated. The snap-in frequently happened when the probe was preserved for a certain time or after being used for imaging solid surfaces under atmospheric conditions. In contrast, imaging in liquids rarely induced a snap-in. After a series of control experiments, it was found that the snap-in can be attributed to hydrophobic interactions between the water/gas interface and the AFM probe, which was either modified or contaminated with hydrophobic material. The hydrophobic contamination could be efficiently removed by a conventional plasma-cleaning treatment, which prevents the occurring of the snap-in. In addition, the adsorption of sodium dodecyl sulfate onto the nanobubble surface changed the water/gas interface into hydrophilic, which also eliminated the snap-in phenomenon.