In order to investigate the effect of fresh and brackish water irrigation on soil salinity and summer maize yield under alternating temporal and spatial patterns, brackish water (4 g/L) and freshwater (1 g/L) were used in the four growth stages of summer maize (emergence, jointing, heading, and filling) in Nanpi, Hebei, for rainwater experiments of alternate trench irrigation. According to different combinations of brackish water irrigation modes, it was divided into four treatments: Treatment 1 - in the whole growth period 4 ditches were alternately furrowed with freshwater- brackish water-freshwater- brackish water, Treatment 2 - Whole growth period ditch 1 and ditch 3 were all filled with freshwater, ditch 2 and ditch 4 were filled with brackish water; the treatment 3-ditch 1 and the ditch 3 were alternately furrowed with freshwater- brackish water- freshwater- brackish water, ditch 2 and the ditch 4alternately furrowed with brackish water- freshwater- brackish water-freshwater; the control CK treatment-four ditches in the whole growth period were all freshwater irrigation. The results showed that, after harvesting, the relationship between soil salinity and ion accumulation in the soil layer of each treatment is as follows: CK treatment of freshwater irrigation during whole growth period