Due to climatic factors and rapid urbanization, the soil in the Loess Plateau, China, experiences the coupled effects of dry-wet cycles and chemical contamination. Understanding the mechanical behavior and corresponding microstructural evolution of contaminated loess subjected to dry-wet cycles is essential to elucidate the soil degradation mechanism. Therefore, direct shear and consolidation tests were performed to investigate the variations in mechanical properties of compacted loess contaminated with acetic acid, sodium hydroxide, and sodium sulfate during dry-wet cycles. The mechanical response mechanisms were investigated using zeta potential, mineral chemical composition, and scanning electron microscopy (SEM) tests. The results indicate that the mechanical deterioration of sodium hydroxide-contaminated loess during dry-wet cycles decreases with increasing contaminant concentration, which is mainly attributed to the thickening of the electrical double layer (EDL) by Na+ and the precipitation of calcite, as well as the formation of colloidal flocs induced by OH−, thus inhibiting the development of large pores during the dry-wet process. In contrast, the attenuation of mechanical properties of both acetic acid- and sodium sulfate-contaminated loess becomes more severe with increasing contaminant concentration, with the latter being more particularly significant. This is primarily due to the reduction of the EDL thickness and the erosion of cement in the acidic environment, which facilitates the connectivity of pores during dry-wet cycles. Furthermore, the salt expansion generated by the drying process of saline loess further intensifies the structural disturbance. Consequently, the mechanical performance of compacted loess is sensitive to both pollutant type and concentration, exhibiting different response patterns in the dry-wet cycling condition.