The grain characteristic and orientation were analyzed using the electron backscatter diffraction (EBSD) for AZ31 hot-rolled alloys. The corrosion initiation of the bimodal microstructure is revealed for the hot-rolled AZ31 alloys obtained by the quasi-in-situ EBSD, showing the preferential corrosion in the fine grain region. Meanwhile, the non-basal crystal plane grain is easier to corrode than the basal crystal plane grain. The adsorption energies of H2O molecule on the crystal planes of magnesium matrix were calculated by the density functional theory method, and a new insight into the corrosion anisotropy of crystal planes was proposed from the surface adsorption energy.