Fibromyalgia (FM) and ankylosing spondylitis (AS) are both rheumatic diseases characterized by significant musculoskeletal pain. In this study, we investigated the differences of the resting-state network (RSN) connectivity and gray matter volume (GMV) between FM, AS and healthy controls (HCs). We recruited 38 FM patients, 82 AS patients and 61 HCs in this study. All the participants underwent resting-state functional MRI (rs-fMRI) scans in a GE 3.0T MR system. Independent component analysis (ICA) was conducted on the rs-fMRI data, and group differences of the rsFC between different resting-state networks were calculated using dual regression. We also conducted voxel-based morphometry (VBM) analysis to investigate the differences of the GMV in FM, AS and HCs. The rsFC between the dorsal default mode network (DDMN) and the body of left caudate nucleus was significantly decreased in FM patients in comparison to AS patients (87 voxels, p = 0.025). VBM analysis showed that the GMV of the left posterior lobe of cerebellum was significantly increased in FM patients compared with AS patients (88 voxels, p = 0.036). Neither ICA nor VBM analysis revealed significant differences of RSN connectivity or GMV between FM patients and HCs. The altered rsFC between DMN and the caudate nucleus suggested an aberrant cortico-striato-thalamo-cortical circuit in FM patients, indicating aberrant reward processing, with potential association with mood, motivation and cognitive functions. The increased GMV in the left posterior lobe of cerebellum indicated the participation of cerebellum in the abnormal pain processing in FM patients.