A machining method in which both end portions of an elongated workpiece are supported horizontally by end portion supporting means (13, 15) and the supported workpiece is rotated about its axis, and the outer peripheral surface of the workpiece is machined by relative movement of the workpiece and a tool held by tool holding means, the machining method characterized by comprising: an attaching step of supporting the workpiece by the end portion supporting means and attaching a measuring head for measuring the distance between the measuring head and the outer peripheral surface of the workpiece without contact to the tool holding means; a measuring step of rotating the workpiece about its axis at a rotational speed for when the workpiece is machined and measuring the distances between the measuring head and each of a plurality of measurement points on the outer peripheral surface of the workpiece in a plane perpendicular to the direction of the workpiece axis by the measuring head at a plurality of measurement positions in the direction of the workpiece axis; a deflection shape calculating step of calculating the positions of the measurement points on the outer peripheral surface of the workpiece with respect to each measurement position on the basis of the distances measured in the measuring step, calculating the center position of the workpiece at each measurement position on the basis of the calculated positions of the measurement points, and calculating the deflection shape of the workpiece on the basis of the calculated center positions; and a machining step of detaching the measuring head from the tool holding means, attaching the tool to the tool holding means, and machining the outer peripheral surface of the workpiece by moving the tool along the calculated deflection shape. an attaching step of supporting the workpiece by the end portion supporting means and attaching a measuring head for measuring the distance between the measuring head and the outer peripheral surface of the workpiece without contact to the tool holding means; a measuring step of rotating the workpiece about its axis at a rotational speed for when the workpiece is machined and measuring the distances between the measuring head and each of a plurality of measurement points on the outer peripheral surface of the workpiece in a plane perpendicular to the direction of the workpiece axis by the measuring head at a plurality of measurement positions in the direction of the workpiece axis; a deflection shape calculating step of calculating the positions of the measurement points on the outer peripheral surface of the workpiece with respect to each measurement position on the basis of the distances measured in the measuring step, calculating the center position of the workpiece at each measurement position on the basis of the calculated positions of the measurement points, and calculating the deflection shape of the workpiece on the basis of the calculated center positions; and a machining step of detaching the measuring head from the tool holding means, attaching the tool to the tool holding means, and machining the outer peripheral surface of the workpiece by moving the tool along the calculated deflection shape.