The invention discloses a centering device and method for a power head of a vehicle-mounted drilling rig and a test bench. The device includes a translation system, a drilling rig car, a feeding body, a power head, a laser signal transmitter, a performance test bench of a drilling rig, and a laser signal receiving plate The translation system includes hydraulic system, flow distribution valve group, X right translation cylinder and Y right translation cylinder, right moving platform, X left translation cylinder and Y left translation cylinder, left moving platform. The invention determines the moving direction and distance of the translation system through the laser signal transmitter and the laser signal receiving plate, and uses electro-hydraulic control to control the movement of the left and right mobile platforms, so as to realize the vehicle-mounted drilling rig as a whole in the coordinate system with the center of the drilling rig performance test bench as the coordinate origin. Translate in the Y direction, cooperate with the movement of the feeder body, power head, and drilling rig to complete the precise alignment between the center of the power head and the center of the test bench, avoiding the failure of the test bench caused by the additional lateral force caused by insufficient alignment accuracy, and ensuring that the on-board Drilling rig performance testing went smoothly.