The dynamic obstacle avoidance of the five-axis redundant industrial manipulator is studied; its trajectory planning is established and simulation analysis is conducted. The five-axis redundant industrial manipulator is modelled first, and then its motion model is established by Denavit-Hartenberg. Based on the motion logic, the joint motion orders are analysed, and the motion model is made by algebraic method. Subsequently, the model is simplified and the obtained trajectory should conform to the requirements. Meantime, the arm plane and obstacle avoidance surface are introduced to parametrically express the zero-space motion of the redundant manipulator. In terms of the predetermined detection target, the artificial potential field method is used to detect the collision between the manipulator and the obstacle, and the motion process of the virtual repulsion force in space can be detected, improving the previous control method for inverse motion, which makes the dynamic performance of the manipulator have the similar physical properties of quasi mass-damping system in obstacle avoidance. This method can not only effectively control the end effector, but also realize the obstacle avoidance of the manipulator. To test feasibility of the proposed method, the experiment is conducted through the rail selfmaintenance. Through the simulation of dynamic obstacle avoidance and trajectory planning, it is found that the nearest distance between the manipulator and the obstacle is more than 40 mm, the dynamic difference of the end effector is less than 9 mm, and the static difference is less than 3 mm. The self-motion of the manipulator is studied to address the problem of obstacle avoidance. This method has no effect on the end effector and provides a technical reference for the unmanned system driving.