We built a feedback control system for conducting atomic force microscopy (AFM) spectroscopy measurements. This system can compensate for the torsional displacement between the cantilever and sample surface with a reverse stage movement according to the error of cantilever tilt signal (FMM). Therefore, the system is effective for long-term electrical measurements at one point without the effect of torsional drift. In addition, we describe the results of applying this feedback control system to electrical measurements of thin SiO2 film.