Anelastic recovery of pure magnesium was monitored quantitatively by means of acoustic emission (AE) in cyclic compression–quick unloading–recovery process. The influences of grain size, strain rate, and the strain-controlled cyclic process on anelastic recovery were analyzed in details. A detwinning model in anelastic recovery process was proposed, and the results showed good agreement with the experimental data. Three stages of anelastic recovery behavior as a function of strain were observed: stages I and III were considered to be dominated by various detwinning processes and stage II was dominated by thermal motion of dislocation. A quantitative relationship between anelastic recovery strain and AE signals was obtained, and from which the anelastic recovery strains from dislocation motion and detwinning were separated for the first time. In the strain-controlled cyclic process, both the amount of AE signals and the anelastic recovery strain were observed to decrease while the fraction of anelastic recovery strain from dislocation motions was observed to decrease more rapidly than that from detwinning with increasing cyclic number.