In this paper, we investigate the formation control of multiple unmanned aerial vehicles (UAVs) in an obstacle-laden environment for target tracking. The main contribution of this paper is to develop a potential field based leader-follower formation control method for target tracking and obstacle/collision avoidance. In the potential field, a quantity of virtual positive charge carried by each of UAVs varies depending upon their roles as a leader or follower when obstacles and targets are regarded as ions with larger positive and negative charges, respectively. Therefore, the formation formed by the UAVs connected with their inter-bonds could be adapted while the UAVs get around the obstacles and are attracted to the targets. The potential field based leader-follower formation control method is developed to reshape a UAV team configuration to track a target while the UAV team avoids the obstacles. The adaptivity and efficiency of the closed-loop UAV system was validated by simulating a flying formation of the multiple UAVs to track the target while the formation was adapted to avoid the obstacles.