The paper focuses on the issue of capturing a moving target for multiple unmanned aerial vehicles (UAVs). The problem involves a group of UAVs to create a formation-pursuit in the encirclement of a moving target. Dynamic task allocation algorithm is used in 3D dynamic environments to efficiently allocate the target to several existing UAVs. Target information is disseminated to neighbor UAVs by the temporary leader of UAVs. For the formation-pursuit using a position-based strategy, destination points to create formation are made at the sphere coordinates around a moving target. Then the destination points are tracked using a fuzzy state feedback controller. Optimized artificial potential field (APF) algorithm is used to avoid collisions with targets, other UAVs, and static obstacles. Each UAV can choose the optimal trajectory to avoid obstacles and reset the formation after passing them. The simulation results show that multi-UAVs successfully surrounded and formed formation-pursuit of a moving target without colliding with the closest Euclidean distance between UAVs of 1.32957 m. UAVs with a target is 1.94359 m, and UAVs with static obstacles within a range of 1.60632 m.Keywords—formation-pursuit, multi-UAVs, obstacle avoidance, task allocation, tracking control.