Recently, flame detection has attracted great attention. However, existing methods have the issues of low detection rates, high false alarm rates, and lack of smoke anti-interference ability. In this letter, a novel dynamic attention-based network (DANet) is proposed for autonomous flame detection in various scenarios. To mitigate the disturbance of smoke in images, a dynamic attention strategy is proposed to discover the potential features among scale-awareness and spatial-awareness. Then, based on dynamic attention module, a decoupled detection head is presented, which can predict category, regression, and object score independently to boost the performance. A self-contained challenging flame dataset, which is multi-scene, multiscale, and multi-interference informative is constructed to evaluate the proposed model and organize the experiments. Extensive ablation and comparison studies on self-labelled dataset reveal the effectiveness of the proposed dynamic attention-based network.