The hexagonal close-packed metals, represented by magnesium and titanium, have attracted increasing attention in the fields of biology, aerospace and automobile. However, the strength of pure magnesium and pure titanium is low, which seriously restricts their applications. In this work, pure magnesium and pure titanium with gradient structure were prepared by ultrasonic surface rolling processing (USRP). The microstructure evolution during USRP was analyzed by optical microscopy (OM), scanning electron microscopy (SEM) and electron back scatter diffraction (EBSD). The results show that the grain size gradient, deformation twin gradient and hardness gradient appear from the surface to the interior of pure magnesium and pure titanium. The tensile testing results show that the strength of pure magnesium decreases while the elongation at fracture increases significantly after USRP. On the other hand, the yield strength and tensile strength of pure titanium both increased significantly after USRP, whereas the fracture elongation decreased.