With the increase of per capita car ownership, traffic accidents frequently occur, in which rear-end collision accounts for 30% to 40% of the total accidents; thus, rear-end collision has become the primary factor of traffic environment deterioration. Therefore, how to improve road traffic safety and reduce the probability of rear-end collision has become a major social concern. In this study, based on the safety pre-warning algorithm, a vehicle collision model was built, and a vehicle anti-collision warning system was established. The calculation was performed based on the sample data to obtain the prediction value of vehicle collision time under different driving speeds, so as to provide drivers with effective response time and reduce the casualties and property losses caused by a vehicle collision. The experimental results showed that the accuracy rate of the pre-warning reached 80% when the speed was regarded as a variable, and the simulation results showed that the early pre-warning or delayed pre-warning rate was very low, and the timeliness rate reached 89%, which enables drivers to react quickly in the appropriate time and effectively reduces the risk of vehicle rear-end collision.