Abstract Taking weak expansive soil as the research object, octadecyl primary amine (octadecylamine) was mixed into remolded expansive soil as a water repellent, and modified samples with different octadecylamine content and initial moisture content were configured. The dripping water penetration time method was used to determine the water repellency grade of the modified expansive soil, and the critical moisture content test of the modified expansive soil was carried out to analyze the relationship between different octadecylamine content and the initial moisture content of the expansive soil. The results show that with the increase of the initial moisture content, the water repellency of the modified expansive soil first increases and then decreases. When the octadecylamine content is 0.8%, the limit moisture content is 33.33%, and the peak moisture content is 29.51%. The bottom water content is 0%, and its interval value is 3.78 times larger than when the octadecylamine content is 0.2%.he above research results can provide a test basis for the engineering application of modified expansive soils.