With the advancement of agricultural intelligence, dairy-cow farming has become a significant industry, and the application of computer vision technology in the automated monitoring of dairy cows has also attracted much attention. However, most of the images in the conventional detection dataset are high-quality images under normal lighting, which makes object detection very challenging in low-light environments at night. Therefore, this study proposed a night-time detection framework for cows based on an improved lightweight Zero-DCE (Zero-Reference Deep Curve Estimation) image enhancement network for low-light images. Firstly, the original feature extraction network of Zero-DCE was redesigned with an upsampling structure to reduce the influence of noise. Secondly, a self-attention gating mechanism was introduced in the skip connections of the Zero-DCE to enhance the network’s attention to the cow area. Then, an improved kernel selection module was introduced in the feature fusion stage to adaptively adjust the size of the receptive field. Finally, a depthwise separable convolution was used to replace the standard convolution of Zero-DCE, and an Attentive Convolutional Transformer (ACT) module was used to replace the iterative approach in Zero-DCE, which further reduced the computational complexity of the network and speeded up the inference. Four different object-detection models, YOLOv5, CenterNet, EfficientDet, and YOLOv7-tiny, were selected to evaluate the performance of the improved network and were tested on the night-time dataset before and after enhancement. Experimental results demonstrate that the detection performance of all models is significantly improved when processing night-time image samples through the enhanced Zero-DCE model. In summary, the improved lightweight Zero-DCE low-light enhancement network proposed in this study shows excellent performance, which can ensure that various object-detection models can quickly and accurately identify targets in low-light environments at night and are suitable for real-time monitoring in actual production environments.