To overcome the defects of traditional fire detection methods that have a high false alarm rate and long delay, a smart tunnel fire monitoring method based on a YOLOX deep convolutional neural network and edge computing is proposed. This method first improves the detection accuracy by analyzing the relationship between frequency domain and convolutional neural networks and the use of wavelet transform. Then, based on the smoke features observed in the experiments, a fuzzy loss method is proposed to accelerate the model convergence speed. To address the issue of a weak computing power of edge devices, the training model is optimized by using knowledge distillation and model quantization, thereby improving the running speed on edge devices. At the same time, a series of related lightweight methods are adopted to optimize the model, reduce the computational cost, and improve the detection speed. Finally, the accuracy of flame and smoke detection on a self-built dataset reaches 85%, which is about 1.8% higher than the baseline method YOLOX and achieves a balance between the speed and accuracy of the model.