Microgrooves of different widths and microgrooves structures with varying widths were engraved on the surface of 6061 aluminum alloy using fiber laser marking equipment. In order to investigate the influence of the width of microgrooves on its cavitation behavior, cavitation tests on the microgroove structure were performed using an ultrasonic vibration apparatus. The hardness, the surface roughness, and the microscopic morphology of the samples were examined with a digital microhardness tester, a digital three-dimensional video microscope, and a scanning electron microscope, respectively. The results demonstrated that, increasing microgroove size was conducive to inhibition of cavitation erosion while decreasing microgroove size had an opposite effect. The surface microgrooves group elongated the incubation period of aluminum alloy in the cavitation tests, and noticeably increased the cavitation resistance of the aluminum alloy. It was also concluded that, the microgrooves group could transform microjets aiming at the alloy surface to the inside of microgrooves, and absorbed the impacted energy from microjets, leading to a remarkable anticavitation effect.