We found weaker functional connectivity between the right DLPFC and the right ACC in the CP+ group compared to the CP− group, and this functional connectivity showed a positive correlation with the duration of cancer pain. Here, CP is linked to cancer.