The present rear-end collision accident proportion on the road increases day after day, car collision avoidance system is more and more paid attention. Analysising the existing car collision avoidance system, we propose a car anti-collision algorithm based on safe distance model in this paper. This method takes the influence factors of safety distance for main parameters which fully considers the speed change and the acceleration change of the car 1 and the car 2. It may realize real-time information acquisition and warning judgment according to the state of car 2, the car could automatic braking if necessary. VB simulation shows that the algorithm can effectively avoid collision, also automatically maintain the distance between vehicles, and lay a foundation for further research on the unmanned car.