High-speed atomic force microscopy (AFM) has been rapidly developed in recent years. To reduce the oscillation of the scanner, a single-tone sinusoidal wave is widely used as a scanning wave rather than a triangular wave in high-speed AFM. However, the sinusoidal wave is nonlinear, resulting in a nonconstant relative linear velocity between the sample and the tip while scanning in the x-direction. If a traditional proportional-integral controller is still used as a feedback controller in the z-direction, the control errors will be enormous. Therefore, the paper proposes a new adaptive velocity-dependent proportional-integral controller. The relationship between the proportional-integral parameters and the linear velocity is achieved by fitting the experimental results. The adaptive and traditional controllers are compared against each other in some examples. The experiments demonstrate that the adaptive controller decreases the control errors in the z-direction to a half, which provides more precise AFM images. LAY DESCRIPTION: Typically, the scanner follows a triangular waveform in fast axis (x-axis), and follows a very slow ramp signal in the slow axis (y-axis) of conventional AFM. This scanning mode can be called raster scan. However, the triangular waveform contains high-order Fourier harmonics, vibrating the scanner and distorting the image easily. In high-speed AFM, the effect of the high-order Fourier harmonics will be more severe. The above problems can be solved by replacing triangular waves with single-tone sinusoidal waveform. Therefore, the sinusoidal-raster scan and nonraster scan based on the sinusoidal waveform are widely used in high-speed atomic force microscopy. However, the nonlinearly scan path will cause a variable relative linear velocity between the sample and the tip. If a standard proportional-integral controller is still used as a feedback controller in Z direction, the control errors will be large, and this difference will be evident at high-speed scanning. Thus, the paper proposes a new adaptive velocity-dependent proportional-integral controller to solve this problem. Experiments show that the control errors obtained by using the adaptive controller is about a half of that without using it. These illustrate that the proposed method can improve the image quality of the AFM at both low and high scan speeds.