Dust explosions are among the most hazardous incidents in industrial production. The inherent dangers of dust make its testing not only risky but also costly. Consequently, it is crucial to identify a method for rapidly determining dust explosion hazards. Previous quantitative structure-property relationship (QSPR) methods have been computationally demanding, time-consuming, and inefficient. In this study, the minimum ignition energy is predicted using the MPNN model, a graph neural network that extracts molecular data features to make accurate predictions based on chemical structure. The input data is transformed into a compact representation, facilitating more efficient analysis and learning by machine learning algorithms. By converting the molecular structure into SMILES for training, employing molecular enhancement via the SMILES molecular traversal algorithm, and optimizing the model through hyperparameter optimization, the MPNN was compared with the GCN and GAT models. The confusion matrix, ROC curves, and PR curves were evaluated for all three models. The MPNN model outperformed the other two models in predicting dust explosion hazards. After data augmentation and hyperparameter optimization, the performance of all three models improved significantly: the MPNN model enhanced its performance by 4% on the ROC curve and 4% on the PR curve; the GCN model by 6% on the ROC curve and 7% on the PR curve; and the GAT model by 2% on the ROC curve and 3% on the PR curve. Nevertheless, among the optimized models, the MPNN model still demonstrated the best performance on the ROC and PR curves, achieving an accuracy of 98%. By visualizing the classification results using the t-SNE algorithm, it was found that the MPNN model was better at capturing the relationships between nodes on the molecular graph, resulting in superior performance in the classification task. In contrast, the GCN and GAT models underperformed in utilizing graph node information, leading to less efficient predictions. Analysis of the molecular structures in the prediction results indicates that the minimum ignition energy is >30 mJ for chain compounds and below 30 mJ for cyclic compounds, influenced by both the conjugation system and molecular weight. The MPNN model has demonstrated high accuracy and robustness in predicting dust explosion hazards, providing an effective solution to reduce experimental risks and costs. In conclusion, the study presents a method for rapidly determining dust explosion hazards using the MPNN model, a graph neural network that accurately predicts minimum ignition energy based on chemical structure. The MPNN model outperformed other models in terms of accuracy and efficiency, providing an effective solution to reduce experimental risks and costs. These findings have significant implications for industrial production and can be applied at large-scale to enhance safety measures in real-world conditions.