In order to study the corrosion behavior of magnesium alloys of high performance in the simulated seawater by continuous variable cross section direct extrusion (CVCDE), an electrochemical method and weight loss method were used to study the difference between AZ31 magnesium alloys produced by CVCDE with different numbers of interim dies to examine the electrochemical corrosion behavior and corrosion rate at 3.5 wt.% NaCl solution in this paper. Scanning electron microscopy and x-ray diffraction were used to analyze the morphology of corrosion surfaces and the composition of the corrosion products of samples soaked for different times. The results show that after CVCDE with different numbers of interim dies, the size of the microstructure is refined gradually, and the grain orientation is also different; with the increase in the number of interim dies, the thermodynamic corrosion tendencies are different, and the corrosion resistance of samples extruded by conventional extrusion is relatively good; the charge transfer and material transfer process are the two main factors affecting the corrosion rate, which determines the direction of the electrochemical reaction; the corrosion form of the sample extruded by CVCDE is the local corrosion which is the filiform corrosion and pitting corrosion, and the corrosion product is mainly water-insoluble Mg(OH)2.