In this paper, we propose a new optimal trajectory planning method for the manipulator to optimize its operating efficiency and ensure the smoothness of the motion process. The position sequences in joint space corresponding to a specified trajectory in task space are obtained by using the inverse kinematic algorithm, and the seventh-degree B-spline curve interpolation method is used to construct the joint trajectory with controllable start–stop kinematic parameters, and continuous velocity, acceleration and jerk. The kinematic constraints of the manipulator are transformed into the control point constraints of the B-spline curve, the sequential quadratic programming method is used to solve the optimal motion time node, and then the time-optimal continuous jerk trajectory satisfying the nonlinear kinematic constraints is planned. Simulation results show that the proposed trajectory planning method provides the ideal trajectory for the joint controller, ensuring the manipulator can smoothly track any specified trajectory in the task space in the shortest time.