An attitude control-based sole glue spraying path planning method of the present invention mainly comprises a robot, a laser profile measurement instrument, a glue gun and an industrial control computer. By using the laser profile measurement instrument to scan a sole, the three-dimensional point cloud of a sole curve is obtained, after the data is processed, a glue spraying path is planned, a control program is generated on the industrial control computer to be introduced into the robot, and the attitudes of the glue gun at the tail end of the robot are controlled according to different shoe types, so that a glue spraying process of the sole is finished, the attitudes of the glue gun can change along with the slope of a sole profile fitting curve, and the attitudes of the glue gun at the tail end of the robot can be controlled according to the different shoe types. Moreover, the glue spraying path of the present invention is smoothed, so that the commutation times of a robot motor can be reduced, and the operation speed of the robot is improved, and accordingly, the glue spraying efficiency is improved, and the working service life of the robot is prolonged.