During automatic polishing process, path trajectory is an important factor affecting the quality of machining. In this paper, a path generation algorithm based on adaptive Hilbert curves which can cover the curved surface evenly is proposed. The generated path not only makes the coverage density adjustable but also is able to pass through the points on the curved surface in more directions which is helpful to get a finished part without stripes. Using the proposed algorithm, the uniform distributed grid points are obtained in the parameter domain and then these node points with adjustable density can be calculated accordingly. Thus, according to the construction rule of adaptive Hilbert curve, the objective toolpaths are subsequently obtained. After that, by means of a mapping strategy, the path trajectory can be obtained on the physical space. To verify the proposed algorithm, uniform polishing paths with variable density are planned on two typical curved surfaces. The result of the machining experiment shows that the curved mirror-like surface can be achieved, and it also indicates the applicability of the proposed method.