In order to improve the ride comfort and safety of the traditional adaptive cruise control (ACC) system when the preceding vehicle changes lanes, this paper proposes a target vehicle selection algorithm based on the prediction of the lane-changing intention of the preceding vehicle. First, NGSIM dataset is used to train a lane-changing intention prediction algorithm based on sliding window SVM, and the lane-changing intent of the preceding vehicle in the current lane can be identified by lateral position offset. Secondly, according to the lane-changing intention and the collision threat of the preceding vehicle, the target vehicle selection algorithm is studied under three different conditions: safe lane-changing condition, dangerous lane-changing condition, and lane-changing cancellation condition. Finally, the effectiveness of the algorithm proposed in this paper is verified in the co-simulation platform. The simulation results show that the target vehicle selection algorithm proposed in this paper can ensure the smooth transfer of the target vehicle and effectively reduce the longitudinal acceleration fluctuation of the subject vehicle when the preceding vehicle changes lanes safely or cancels the lane change. In the case of a dangerous lane change, the target vehicle selection algorithm proposed in this paper can respond to the dangerous lane change in advance compared with the target vehicle selection method of the traditional ACC system, which can effectively avoid collisions and improve the safety of the subject vehicle.