This study aims to investigate the effect of sand compaction piles on the swelling and shrinkage behavior of expansive clay soil. A series of experimental laboratory tests were carried out using the modified Proctor mold and a circular footing. The diameter of the sand compaction pile was selected to give a replacement area ratio equal to 57%. To model the swelling and shrinkage cycles, water was added to the sample and the heave was recorded at regular time intervals. The shrinkage was obtained by heating the outer surface of the modified Proctor mold at a temperature of 110°C ± 5°C by a development heating system designed for this purpose to accelerate the shrinkage process. The vertical movement was recorded at regular time intervals. The swelling and shrinkage cycles were carried out under an externally applied pressure equal to 120 kPa. The main results of this study showed that, for untreated expansive soil, the swelling potential reaches the highest value at the second cycle and started to decrease for the subsequent cycles. After the fourth cycle, the swelling potential decreases and reaches about half the value of the initial swelling potential and the equilibrium state occurs. For expansive soil treated with a sand compaction pile, it is found that there is a significant reduction in both swelling and shrinkage potential. Moreover, it is observed that after the first cycle both the swelling and shrinkage potential decrease significantly, and both reach a negligible value after the second cycle.