According to the confined compression test in Xining area, the variation law of pressure on the collapsible deformation and compress deformation of loess is analyzed. The qualitative and quantitative analysis of the microstructure of loess samples before and after collapsing is carried out by electron microscopy. The relationship between the microstructure of the loess sample and the collapsible deformation is analyzed. The results show that:(1)with the increase of pressure, the deformation and compression of loess collapsing gradually become smaller, the soil is compacted, the strength is increased, the compressibility is weakened, the collapsibility is weakened or no collapsibility; (2) with the increase of pressure, the microscopic image observation of the sample before immersion, the structure of the undisturbed soil sample is relatively loose, the pores and particles are clearly distinguished, and the particle contour is relatively clear. After the sample is immersed in water, the arrangement of the skeleton particles becomes very tight, and the pore shape changes from large become small. As the pressure continues to increase, the microstructure of the sample gradually becomes dense; (3) the pressure increases with the increase of pressure before and after immersion in water. The arrangement gradually became stable, the particle distribution gradually concentrated and the degree of agglomeration became higher, and the proportion of pore area gradually decreased. The macroscopic collapse deformation and compression deformation of the loess before and after water immersion were consistent.