In challenging night-time settings, drivers often struggle to discern nearby vehicles accurately, resulting in traffic incidents caused by intricate lighting conditions and the dim visibility, blurring, and occlusion of vehicles. To address this issue, this study introduces an advanced method utilizing the enhanced YOLOv5 algorithm, designed to improve the detection of vehicles during night driving and ensure detection accuracy in low-light environments. Initially, SKAttention is integrated into the network's Backbone layer to address overlapping and redundant information within the model. This is achieved by generating multiple pathways with varying convolutional kernel sizes, which correspond to the different sensory field sizes of neurons, thus enhancing information processing efficiency. Subsequently, the model's original up-sampling operator is replaced with the Content-Aware Feature Reorganization (CARAFE), leveraging underlying content information to predict the reorganization kernel and reassemble predefined neighborhood features. This ensures the preservation of feature map quality post-zooming. Moreover, the incorporation of SIOU significantly enhances the model's ability to pinpoint defect locations with greater accuracy, leading to improvements in both training speed and inference accuracy. Experimental outcomes demonstrate that the optimized model, KSC-YOLOv5, surpasses the baseline YOLOv5 model, showing a mean average precision (mAP) increase of 2 percentage points to 91.2%. Additionally, when compared with other iterations of the YOLO algorithm, KSC-YOLOv5 exhibits superior performance in terms of average detection accuracy. This refined model effectively navigates the challenges posed by inadequate lighting and vehicle blurring in nocturnal environments, achieving precise vehicle detection.