A solar adaptive optics system for a high-dispersion spectrograph is developed at the 60 cm domeless solar telescope of the Hida Observatory in Japan. Details of its optical setup are described for implementing a scanning slit spectroscopy with wavefront correction. A wavefront sensor used in the system is specified and a technique of reducing computational cost in wavefront sensing is also described. In solar observations, the improvement of contrast in images obtained with the adaptive optics system was demonstrated when a sunspot was used as a target of wavefront sensing.