Magnesium (Mg) alloys are attractive for light-weight applications such as in the aerospace and automobile industries, due to their high strength-to-weight ratio. The widespread application of Mg alloys in automobiles can decrease fuel consumption through lightweighting, which benefits our environment. Mg alloys are also regarded as promising biodegradable implants for use in the human body. However, the poor resistance of corrosion and stress corrosion cracking (SCC) limits their more wide-spread application in both industry and medical application. It is therefore necessary to better understand the mechanisms and the important factors, which control Mg corrosion and SCC, and to find better ways to improve their corrosion and SCC performance. In this doctoral dissertation, an effort was made to understanding the following issues regarding the corrosion and SCC mechanisms, and behaviour of pure magnesium and magnesium alloys:(1) The corrosion behaviour of ultra-high-purity Mg in 3.5% NaCl solution saturated with Mg(OH) 2 (2) The corrosion behaviour of as-cast and solution-heat-treated binary Mg-X alloys in salt spray and 3.5% NaCl solution saturated with Mg(OH) 2 (3) Influence of hot rolling on the corrosion behaviour of several Mg-X alloys (4) The influence of casting porosity on the corrosion behaviour of Mg0.1Si (5) Stress corrosion cracking of several solution heat-treated Mg-X alloys (6) Stress corrosion cracking of several hot-rolled Mg-X alloys A range of advanced techniques were employed such as optical microscopy (OM), scanning electronic microscopy (SEM), energy dispersive X-ray spectroscopy (EDS), electrochemical polarization, electrochemical impedance spectroscopy (EIS), gas collection of hydrogen evolution from corroding samples, and linearly increasing stress testing (LIST).For the ultra-high-purity Mg in 3.5% NaCl solution saturated with Mg(OH) 2 , the intrinsic corrosion rate measured with weight loss, P W = 0.25 ± 0.07 mm y -1 . The average corrosion rate measured from hydrogen evolution, P AH , was lower than that measured with weight loss, P W , attributed to dissolution of some hydrogen in the Mg specimen. The amount of dissolution under electrochemical control was a small amount of the total dissolution. A new hydride dissolution mechanism was suggested.For solution-heat-treated Mg-X alloys (X = Mn, Sn, Ca, Zn, Al, Zr, Si, Sr), corrosion rates did not meet the expectation that they should be equal to or lower than those of high-purity II Mg. There was circumstantial evidence that the higher corrosion rates were caused by the particles in the microstructure; the second phases had been dissolved.For the hot-rolled Mg-X alloys (X = Gd, Ca, Al, Mn, Sn, Sr, Nd, La, Ce, Zr or Si) in 3.5% NaCl solution saturated with Mg(OH) 2 , the corrosion rate for all Mg-X alloys (except Mg0.1Zr and Mg0.3Si) decreased after hot rolling, attributed to fine-grained alloys having a more homogeneous microstructure, and fewer, smaller second-phase particles. For Mg0.1Zr and Mg0.3Si, the corrosion rate increas...