To study the mechanical effect of clay under acidic and basic conditions, typical clay minerals, montmorillonite and illite, were taken as the main research objects in this study. The variation law and mechanism of the cohesive force and internal friction angle were studied by immersing the remoulded soil in HNO3 solution with pH = 3 and NaOH (alkaline waste liquid) with pH = 13.5, respectively. It was found that, under acidic conditions, a corrosion reaction between clay minerals and nitric acid occurred. Except for the medium-term, the cohesion generally shows a decreasing trend, and the internal friction angle has little change. Under alkaline conditions, the cohesion of montmorillonite-quartz sand remoulded soil decreased briefly in the early immersion stage of and increased in the middle and late stages. The internal friction angle increases steadily with the extension of immersion time. The cohesion of illite-quartz sand remoulded soil also decreased first and then increased, while the internal friction angle changed little. X-ray diffraction analysis shows that montmorillonite and illite will corrode under acidic conditions, and no new material will be generated, resulting in a decrease in soil cohesion. Under alkaline conditions, montmorillonite was seriously depleted, resulting in the formation of zeolite minerals (zeolite X, garronite) and new cement hydrated calcium silicate CSH (xonotlite). Strong alkali reacts with illite to generate sodium metaaluminate (NaAlO2) and liquid cement Na2SiO3 (sodium silicate). The formation of new cements is the main reason for the increase in cohesion under acid-base conditions, and chemical corrosion and ion exchange cause a decrease in cohesion.