In the field of intelligent transportation systems and urban security, it is crucial to obtain accurate information of vehicles. Vehicle-related information can be directly obtained through visual recognition means such as video or images. However, in low-light environments, the image brightness and contrast decrease, the noise level increases, and the image features are prone to loss. These problems lead to a significant reduction in the detection accuracy of vehicle detection algorithms. Therefore, we propose a vehicle detection method based on low-light image enhancement and an improved object detection algorithm. The low-light image was first enhanced using the image enhancement algorithm ZeroDCE to improve the image brightness. Then, the improved AFF-YOLO object detection algorithm is utilized to perform vehicle detection on the enhanced image. Finally, the proposed method is tested on a vehicle dataset, and the vehicle detection accuracy under different low-light levels is analyzed. The results show that the proposed method can effectively improve the vehicle detection accuracy. Compared with low-light images, mAP@0.5 of the enhanced images improved by 4.9% to 94.7%. As the illumination intensity decreases, the object detection accuracy of the enhanced image improves more significantly. The research results can provide a reference for vehicle detection in low-light environments.