Cancer secondary to dermatomyositis (DM) is defined as paraneoplastic dermatomyositis, which is one of the major subtypes of DM. However, cases of DM with intrahepatic cholangiocarcinoma (ICC) are rarely reported. In the course of our clinical work, we encountered a case of a middle-aged female patient who was diagnosed with DM for 7 years and then diagnosed with ICC, and we would like to share this case. In addition, in order to further investigate the deeper mechanism of ICC associated with DM, we also analyzed the dataset related to DM and ICC in the Gene Expression Omnibus (GEO) database based on the machine learning methods and found that poly(ADP-ribose) polymerase family member 12 (PARP12) and metallothionein 1M (MT1M) were closely associated with ICC secondary to DM. They are potentially important biomarkers for predicting the occurrence of ICC in patients with DM.