We investigated the stability of ionic configurations of the tip of the cantilever in non-contact AFM.; For this, we used a computational model that couples the ionic motion of the MgO surface and the oscillating cantilever. The motion of ions was connected to the oscillating cantilever using a coupling method that had been recently developed. The adhesive process on the ionic MgO surface leads to energy dissipation of the cantilever. It is shown that limited types of ionic configurations of the tip are stable during the adhesive process. Based on the present computational model, we discuss the adhesive mechanism leading to energy dissipation.