With the topics related to the intelligent AUV, control and navigation have become one of the key researching fields. This paper presents a concise and reliable path planning method for AUV based on the improved APF method. AUV can make the decision on obstacle avoidance in terms of the state of itself and the motion of obstacles. The artificial potential field (APF) method has been widely applied in static real-time path planning. In this study, we present the improved APF method to solve some inherent shortcomings, such as the local minima and the inaccessibility of the target. A distance correction factor is added to the repulsive potential field function to solve the GNRON problem. The regular hexagon-guided method is proposed to improve the local minima problem. Meanwhile, the relative velocity method about the moving objects detection and avoidance is proposed for the dynamic environment. This method considers not only the spatial location but also the magnitude and direction of the velocity of the moving objects, which can avoid dynamic obstacles in time. So the proposed path planning method is suitable for both static and dynamic environments. The virtual environment has been built, and the emulation has been in progress in MATLAB. Simulation results show that the proposed method has promising feasibility and efficiency in the AUV real-time path planning. We demonstrate the performance of the proposed method in the real environment. Experimental results show that the proposed method is capable of avoiding the obstacles efficiently and finding an optimized path.