Accident analysis is a crucial aspect of accident prevention, and natural language processing (NLP) techniques can efficiently be applied to analyze the causes of accidents. However, existing analysis methods primarily rely on text clustering and lack the application of accident causation theories, leading to a lack of specific accident cause analysis results. Combining text classification techniques with accident causation theories is an effective approach to address this issue. In this study, we integrated text classification techniques with accident causation theories and utilized coal mine gas explosion accidents as an example. We constructed a corpus, trained a BERT model, and evaluated its performance to obtain a text classification model for accident cause analysis. The results indicated that the BERT model-based text classification algorithm had an accuracy and macro-average F1 value of 0.9878 and 0.7792, respectively, significantly outperforming the control model. The application of this approach demonstrated that combining accident causation theories with text classification techniques for accident cause analysis can improve the efficiency of accident analysis while ensuring the richness of details in analyzing accident causes. By efficiently analyzing a large number of accident cases, this approach can provide a data foundation for data-driven accident prevention and technical support for integrated accident prevention.