The invention discloses a pipe holding machine, and belongs to the field of wind power installation machinery. The pile holding device comprises a mounting seat, a main pushing mechanism and a clamping arm assembly. The clamping arm assembly comprises a first clamping arm, a second clamping arm, a third clamping arm, a first pile holding cylinder, a second pile holding cylinder, an opening and closing cylinder, a plurality of correction cylinder assemblies and a boom cylinder assembly. The boom cylinder assembly includes a boom cylinder, a fixed arm and a boom. When the first pile holding cylinder, the second pile holding cylinder and the opening and closing cylinder are extended, the first clamping arm, the second clamping arm and the third clamping arm are closed, after the clamping armsare closed, the elongation length of the correction cylinder assemblies is adjusted, and the verticality of a foundation pile is adjusted in time. When a certain height difference occurs when the second end of the second clamping arm and the second end of the third clamping arm are closed, the height adjustment of the second end of the third clamping arm is achieved by the boom cylinder, so thatthe second end of the second clamping arm and the second end of the third clamping arm is kept on the same plane to facilitate the connection between the second end of the second clamping arm and thesecond end of the third clamping arm, the operation is simple, and time and labor are saved.