The invention provides a ground-attaching shoveling and planting machine. The machine comprises a vehicle body, a fixing frame, a shovel closing blocking piece, a supporting frame, a position adjusting rod set, a shovel impacting assembly and a collecting and scraping clamping assembly, the top end of the shovel closing blocking piece is fixedly connected with two telescopic rods, a plurality of impacting air cylinders are arranged, and impacting heads are arranged at the front ends of the impacting air cylinders. Multiple impacting rods are arranged and are inserted into a front rod of the supporting frame in a penetrating manner, and shovel blocks are arranged at the front ends of the impacting rods. The impacting heads at the front ends of the impacting air cylinders are pushed to impact the tail ends of the impacting rods, so that the shovel blocks on the front rod of the supporting frame rush out forwards, weed vegetation is pressed on the shovel closing blocking piece in combination with descending of a telescopic rod, the shovel closing blocking piece and the telescopic rod move mutually to cut off the weed vegetation , and the function of shoveling the weed vegetation is achieved. The shoveled weed vegetation can be collected together through the collecting and scraping clamping assembly and treated in a centralized manner, and time and labor are saved; and according to the ground-attaching shoveling and planting machine, the weed vegetation can be shoveled quickly, the thoroughness of shoveling can be ensured by utilizing the gaps between the impacting heads and the tail ends of the impacting rods, and the working efficiency is high.