Application of atomic force microscopy (AFM) in liquid is necessary for imaging and manipulation of biological specimens. The atomic force microscope (AFM) has become an indispensable tool in biology because it permits the imaging and probing of nanomechanical properties of biological samples such as biopolymers and viruses under physiological (liquid environments) conditions. In this paper, we have simulated a tapping-mode AFM (TMAFM) cantilever in liquid environment near a surface. Contact forces have some differences in liquid in comparison to air or vacuum in magnitude or formulation. Hydrodynamic forces are also applied on the cantilever due to the motion in liquid. For modeling we have used a continuous beam model with its first mode and forward-time simulation method for simulation of its hybrid dynamics. The results show a good agreement with experiments. They also show that the effect of separation on free vibration amplitude is great. Its effect on resonance frequency is considerable too. The resonance frequency in liquid is so small in comparison to air due to additional mass and also additional damping created by the viscosity of the liquid around.