Current fire and smoke detection methods mainly rely on site inspection by staff, which results in low efficiency and poor real-time performance, so an efficient fire and smoke detection algorithm for complex scenarios based on YOLOv5s, called YOLOv5s-MRD (YOLOv5s-MPDIoU-RevCol-Dyhead), was proposed. Firstly, the MPDIoU (Maximized Position-Dependent Intersection over Union) method was employed to modify the border loss function, thereby enhancing the accuracy and efficiency of Bounding Box Regression (BBR) by adapting to BBR in overlapping or non-overlapping scenarios. Secondly, the RevCol (Reversible Column) network model concept was applied to reconstruct the backbone of YOLOv5s, transforming it into a backbone network with multi-column network architecture. At the same time, by incorporating reversible links across various layers of the model, so that the retention of feature information was maximized, thereby improving the network’s feature extraction capability. Finally, with the integration of Dynamic head detection heads, scale awareness, spatial awareness, and task awareness were unified, thereby improving detection heads’ accuracy and effectiveness significantly without additional computational cost. Experimental results demonstrate that on DFS (Data of Fire and Smoke) dataset, compared to the original YOLOv5s algorithm, the proposed algorithm achieves a 9.3% increase in mAP@0.5 (mean Average Precision), a 6.6% improvement in prediction accuracy, and 13.8% increase in recall. It can be seen that the proposed algorithm can meet the requirements of current fire and smoke detection application scenarios.