The deformation of the long-distance pipeline often happen due to the Soil collapse, gulch and the settlement of the foundation etc. The large deformation is easy to cause the fracture of the long-distance pipeline. Hence, the deformation detection is of very important to the pipeline safety. In this paper, a method for deformation calculation of the long-distance pipeline is presented based on the relation expression brtween the deformation and the strain of the long-distance pipelien. Through the measured strain, the deformation is easy to be calculated. The strains can be obtained through the FBG sensors or distributed fiber optic sensors. The deformation detection method proposed in the papaer provides the basis of the long-distance pipeline risk management.