Abstract Background Pneumoconiosis has been the leading industrial disease in China. Pneumonia is one of the common comorbidities for patients with pneumoconiosis, which may lead to the worse condition and poor prognosis. Timely and accurate diagnosis is necessary to retard the pneumonia progression in pneumoconiosis patients. Due to the similarity of clinical features between pneumoconiosis and pneumonia, clinical laboratory tests are needed for assessing the hazard of pneumonia occurrence in patients with pneumoconiosis. Therefore, we aim to explore the risk factors of pneumonia from laboratory test indexes for patients with pneumoconiosis, construct prediction model, and evaluate its feasibility. Methods A total of 243 patients with pneumoconiosis from the General Hospital of Xuzhou Mining Group from September 2021 to August 2023 were selected as the modeling set, which was further separated as the non-pneumonia group and the pneumonia group. Nineteen laboratory test indexes related to inflammation, tumor markers, renal function, and blood routine examination were compared between the two groups. The univariate and multivariate Logistic analysis was used to screen out risk factors and construct the prediction model. Two hundred and twenty-eight patients with pneumoconiosis from General Hospital of Xuzhou Mining Group (Yi'an Branch) were enrolled as the validation set. The predictive efficiency of the model on pneumonia for patients with pneumoconiosis was evaluated through Hosmer-Lemeshow(H-L)test and receiver operating characteristic (ROC) curve. Results C-reactive protein (CRP), interleukin-6 (IL-6), interleukin-8 (IL-8), interleukin-10 (IL-10), β2 microglobulin, creatinine, urea, neutrophil percentage, lymphocyte percentage, and lymphocyte count in pneumonia group were significant different from those in non-pneumonia group (<0.05). Logistic regression analysis suggested that CRP (OR=3.883, <0.001), IL-6 (OR=1.217, =0.003), IL-8 (OR=1.215, =0.002) and β2-microglobulin (OR=2.838, =0.002) were independent risk factors for pneumonia in patients with pneumoconiosis. The prediction model was constructed as Logit (P) =1.357×CRP+0.196×IL-6+0.195×IL-8+1.043×β2-microglobulin-9.772. The H-L test demonstrated that there was no significantly difference between predicted values and the true values. The areas under ROC curves of the model in the modeling set and the validation set were 0.909 and 0.848. The sensitivity was 86.8% and 75.6%, and accuracy 82.1% and 79.7%, respectively. Conclusions CRP, IL-6, IL-8, and β2-microglobulin were independent risk factors of pneumonia for pneumoconiosis patients. The risk model constructed by laboratory test indexes showed a good predictive performance, which might provide laboratory evidence for the pneumonia diagnosis in patients with pneumoconiosis.