Dynamic path planning is one of the key procedures for unmanned aerial vehicles (UAV) to successfully fulfill the diversified missions. In this paper, we propose a new algorithm for path planning based on ant colony optimization (ACO) and artificial potential field. In the proposed algorithm, both dynamic threats and static obstacles are taken into account to generate an artificial field representing the environment for collision free path planning. To enhance the path searching efficiency, a coordinate transformation is applied to move the origin of the map to the starting point of the path and in line with the source-destination direction. Cost functions are established to represent the dynamically changing threats, and the cost value is considered as a scalar value of mobile threats which are vectors actually. In the process of searching for an optimal moving direction for UAV, the cost values of path, mobile threats, and total cost are optimized using ant optimization algorithm. The experimental results demonstrated the performance of the new proposed algorithm, which showed that a smoother planning path with the lowest cost for UAVs can be obtained through our algorithm.