Neutron-rich N=22, 24, 26 magnesium isotopes were studied via in-beam γ-ray spectroscopy at the RIKEN Radioactive Isotope Beam Factory following secondary fragmentation reactions on a carbon target at ≈200 MeV/nucleon. In the one- and two-proton removal channels from Al39 and Si40 beams, two distinct γ-ray transitions were observed in Mg38, while in the one-proton removal reaction from Al37 a new transition was observed in addition to the known 21+→0g.s.+ decay. From the experimental systematics and comparison to theoretical predictions it is concluded that the transitions belong to the 21+→0g.s.+ and 41+→21+ decays in Mg36 and Mg38, respectively. For Mg34, previously reported 21+ and 41+ level energies were remeasured. The deduced E(41+)/E(21+) ratios for Mg34,36,38 of 3.14(5), 3.07(5), and 3.07(5) are almost identical and suggest the emergence of a large area of deformation extending from the N=20 to the N=28 shell quenching. © 2013 American Physical Society.