The quadrupole collectivity of neutron-rich even-even neon and magnesium nuclei around N = 20, 28,30 Ne,and 32,34,36 Mg, was studied via proton inelastic scattering on a liquid hydrogen target by in-beam γ -ray spectroscopy in inverse kinematics. The angle-integrated cross sections for the first 2 + states of these nuclei were determined by measuring de-excitation γ rays. The deformation lengths were extracted from the angle-integrated cross sections using distorted-wave calculations. The deformation length of 30 Ne (δ (p,p ) = 1.59 +0.08 −0.09 fm) is smaller than that of 32 Mg (1.83 +0.10 −0.11 fm), which exhibits the largest quadrupole collectivity among the neutron-rich N = 20 isotones. Along the magnesium isotopic chain, the deformation lengths of 34 Mg and 36 Mg were deduced to be 2.30 +0.09 −0.10 fm and 1.90 +0.16 −0.17 fm, respectively. The evolution of quadrupole deformation in the vicinity of 32 Mg is discussed by comparing the present results with the theoretical calculations.