The five-axis on-machine measurement system, equipped with a laser displacement sensor, offers an effective approach for conducting on-site inspections of freeform surface parts. It is crucial to address the calibration error pertaining to the sensor’s pose, encompassing both the beam direction and the zero position, as it directly impacts the measurement accuracy. This paper presents a new approach for the calibration of a laser displacement sensor’s pose, which is mounted on the spindle of a five-axis gantry machine tool. The proposed method utilizes measurements taken from multiple angles of a standard ball. Through the utilization of spherical constraints and coordinate translation transformation, the Levenberg-Marquardt iteration method is employed to derive the sensor’s beam direction, while the least square method is used to determine the sensor’s zero position. Applying this proposed method, the maximum error in the distance between the centers of the standard double ball is below 0.008 mm, which can meet the precision requirements of on-site inspection of freeform surface parts.