The influence of the high-energy ball milling on the corrosion behavior of magnesium in aqueous media has been investigated through electrochemical experiments complemented by morphological, structural, chemical and surface analyses. The milling duration was varied from 0 to 40h. Polarization curves show that the milling procedure improves the magnesium corrosion resistance in passive conditions (KOH solution) and in more active corrosion conditions (borate solution). This is illustrated by the corrosion potential which becomes nobler with milling. The variation of the polarization resistance and related corrosion current with milling time is also an indication of the improvement of the Mg corrosion resistance due to the milling. Moreover, the passive current is significantly lower for milled Mg. The Mg crystallite size is reduced from >100 to 34nm after 10h of milling and does not decrease significantly with further milling. The iron contamination of the Mg powder due to the erosion of the milling tools is very low (0.09wt.% after 40h of milling). In contrast, a significant oxygen contamination occurs during milling (2.6wt.% after 40h of milling). XPS and AES data indicate MgO enrichment in the bulk of the milled Mg without significant MgO increase at the powder surface. The corrosion improvement was attributed to the increase through the milling process of the density of surface defects and grain boundaries susceptible to increase the number of nucleation sites for Mg hydroxylation in aqueous media, leading to the rapid formation of a dense and protective Mg(OH)2 layer.