Aiming at the proximity operation of spacecraft, a collision-avoidance control algorithm based on improved Artificial Potential Fields (APF) method is proposed. According to the real-time state between the spacecraft and the target and obstacles, the APF method is used to calculate the real-time acceleration of the spacecraft, and the trajectory of the spacecraft is planned. In order to improve the applicability of the artificial potential function method, three improvement measures are proposed. First, in order to improve the accuracy of collision warning and reduce additional maneuvers, the collision probability combined with the relative distance, instead of only the relative distance, is used to evaluate the collision. Second, in order to increase the docking safety and slow down the approaching relative velocity, the safety boundary and control margin of relative velocity are used to calculate the target repulsion force. Third, in view of the fact that most spacecraft cannot provide any continuously varying thrust, two practical thrust forms, including the thrust with upper limit and constant variation rate and the bang-bang thrust, are used to substitute for the continuously variable thrust form. Numerical simulations are executed to validate the proposed method. The effects of the major mission parameters, such as the collision warning method, the target repulsion acceleration and acceleration forms, are successfully revealed by the comparison between different examples. The results show that the proposed method can improve the safety and efficiency of the spacecraft proximity operations, and has simple structure and strong real-time performance.