C-(A)-S-H gels are not only affected by the composition of cement-based materials, but also affected by the environment. The effect of pH-values of Na
2SO
4 solution on the structure of C-(A)-S-H gels was studied by solid-state nuclear magnetic resonance (NMR) with deconvolution technique. The results show that the Al[4]/Si value of C-(A)-S-H gels decreases in sulfate attack process, due to Al
3+ entering into gel early and coming out later. The decrease of the erosion solution pH value promotes the migration of Al[4] from C-S-H gels, which leads to the peak position of Al[4] shifting to a negative value. It is found that the average molecular chain length (MCL) of C-S-H gel increases due to the polymerization among[SiO
4] ([AlO
4]) tetrahedra. In addition, the degree of hydration of the pastes is improved with the decrease of the pH-value, which is not favorable to formation of AFt.