Porphyry sea bream are a kind of fish with high economic value. The quantity of eggs produced by porphyry seabream has important significance for the economics of aquaculture companies. However, porphyry seabream spawn at night, which brings challenges to breeders in terms of understanding the breeding situation of broodstock. In this study, to effectively monitor breeding behavior of these fish, a camera using an infrared mode was used to obtain breeding behavior data, and a real-time detection method based on improved YOLOv5l was proposed. The specific improvements were as follows: (1) The SPPF module in the backbone part was changed to the RFB module to improve the feature extraction capability of YOLOv5l. (2) Shortcut connections were added to the FPN part, which were used to enhance the reusability of features and reduce the loss of feature information. (3) The CBAM attention mechanism was added to the PAN part of the network, features at different depths were strengthened and irrelevant features were suppressed. The experimental results showed that the improved model provided an effective method to detect breeding behavior under different conditions. The precision, recall, and mAP@0.5 reached 99.8 %, 99.5 % and 99.5 %, respectively. This research effectively solved the problems such as complex background, unfixed breeding behavior shape, and blurry night video data pixels. Additionally, the results with four classical object detection algorithms (SSD, Yolov3, Yolov4, and Yolov5l) were compared, and the comparison verified that the improved model has certain advantages in precision, AP, model size, and detection speed. Therefore, this study could provide a theoretical basis for accurate monitoring of broodstock breeding behavior and intelligent aquaculture system.