The number of edge embedded devices has been increasing with the development of Internet of Things (IoT) technology. In urban fire detection, improving the accuracy of fire detection based on embedded devices requires substantial computational resources, which exacerbates the conflict between the high precision needed for fire detection and the low computational capabilities of many embedded devices. To address this issue, this paper introduces a fire detection algorithm named EMG-YOLO. The goal is to improve the accuracy and efficiency of fire detection on embedded devices with limited computational resources. Initially, a Multi-scale Attention Module (MAM) is proposed, which effectively integrates multi-scale information to enhance feature representation. Subsequently, a novel Efficient Multi-scale Convolution Module (EMCM) is incorporated into the C2f structure to enhance the extraction of flame and smoke features, thereby providing additional feature information without increasing computational complexity. Moreover, a Global Feature Pyramid Network (GFPN) is integrated into the model neck to further enhance computational efficiency and mitigate information loss. Finally, the model undergoes pruning via a slimming algorithm to meet the deployment constraints of mobile embedded devices. Experimental results on customized flame and smoke datasets demonstrate that EMG-YOLO increases mAP@50 by 3.2%, decreases the number of parameters by 53.5%, and lowers GFLOPs to 49.8% of those in YOLOv8-n. These results show that EMG-YOLO significantly reduces the computational requirements while improving the accuracy of fire detection, and has a wide range of practical applications, especially for resource-constrained embedded devices.