Moisture sorption and macroscopic deformation of hardened cement pastes (hcps) were studied in the first three drying–resaturation (D–R) cycles using low–field 1H nuclear magnetic resonance relaxometry. Four types of water (interlayer, gel, interhydrate and capillary) were detected in the hcps. In principle, they were sequentially removed from larger to smaller pores during drying with decreasing relative humidity (RH), resulting in shrinkage of the hcps. Unexpected increases in gel and interlayer water contents as well as greater shrinkage during drying from 100 % to 69 % RH were observed, which is believed to originate from the re–arrangement of C–S–H structure. Because of the C–S–H re–arrangement, irreversible shrinkage was detected during D–R cycles. The drying and irreversible shrinkage in each cycle diminished with the D–R number. A lower water–to–cement ratio and higher curing temperature for hcps are beneficial for reducing drying and irreversible shrinkage.