A method for constructing pipe piles while drilling for building or bridge foundations. The construction steps are to cover high-strength prestressed concrete pipes or steel pipes with drill pipes on the ground first, and install impactors and reaming retractable drill bits at the front ends of the drill pipes. , Follow the pipe while drilling, follow the pipe retaining wall, drill to the design elevation, stop drilling, withdraw from the reaming to shrink the drill bit, use the mud pump to clean the mud and sediment, pour concrete into the pipe, and simultaneously inject pressure grout to the outside of the pipe wall , stop when concrete and grout reach the ground; the object of the invention is to propose a construction method with fast construction speed, reliable quality, less material consumption, high bearing capacity of piles, mechanized operation, and environmental protection. In the construction method of bored cast-in-place piles, the use of mud retaining walls pollutes the environment, the hole is easy to collapse during the drilling process, the quality of concrete pouring is unstable, and the prestressed pipe piles are easy to cause the soil to rise. The strength of the pile body constructed by the invention is high. , There is no sediment at the bottom of the pile, and the pile end is completely rock-socketed, which can reach more than 2 times the bearing capacity of the same diameter bored pile.