Pneumoconiosis is a serious occupational disease that often occurs to coal workers with no early diagnosis and effective treatment at present. Diffuse pulmonary fibrosis is the major pathological change of pneumoconiosis, and its mechanism is still unclear. Epigenetics is involved in the development of many diseases, and it is closely associated with fibrosis. In this study, we investigated whether DNA methylation contributes to the pathogenesis of pulmonary fibrosis in pneumoconiosis. By exposure to coal dust or silica dust, we established the models of coal worker's pneumoconiosis (CWP), which showed an increased expression of COL‐I, COL‐III. We further found that DNMT1, DNMT3a, DNMT3b, MBD2, MeCP2 protein expression changed. Pretreatment with DNMT inhibitor 5‐aza‐dC reduced expression of COL‐I, COL‐III, and reduced pulmonary fibrosis. In summary, our results showed that DNA methylation contributes to dust‐induced pulmonary fibrosis and that it may serve as a theoretical basis for testing DNA methyltransferase inhibitors in the treatment of CWP.