The quality of composite preform has great influence on its mechanical properties. Aiming at the problems of difficulty in robot teaching and unstable braiding angle in the process of braiding three-dimensional complex component, a control method of robot is proposed. Firstly, the mandrel is discretized to ensure that the axis of each discrete mandrel is perpendicular to the braiding point plane, and the orientation and direction of the tool center are calculated. Then, the take-up speed of the robot is calculated, so that the self-adjustment of the braiding angle can be realized in the braiding process. The experimental results show that the control method can effectively reduce the braiding angle error of variable cross-section mandrel within 2°, and can improve the quality of composite products in actual production.