In this research, a gradient nanostructure (GNS) of 40CrNiMoA steel prepared by the ultrasonic surface rolling process (USRP) is investigated. The results show that the USRP sample surface is equiaxial nanocrystalline and has a high-density nanolamellar gradient structure, and excellent compressive residual stress (CRS) and hardness gradient distribution are observed. In this study, the fretting fatigue (FF) limit of the USRP-treated specimen is 550 MPa, which is about 67 % higher than that of the untreated specimen. It is found that the equiaxed nanocrystalline top layer can effectively delay FF crack initiation. The high-density nanolamellar martensite structure is almost parallel to the surface, reduces the FF crack initiation angle, and increases the crack propagation path. High-strength CRS increases the crack growth resistance and changes the crack growth path. In addition, the improvement in surface hardness, CRS, and surface quality enhances the resistance to fretting wear and FF crack initiation. It is concluded that these factors effectively improve the FF limit of the material.