The invention discloses a new energy charging pile with anti-collision function, comprising a box body, wherein the top of the front side of the box body is fixedly connected with a display, the top of both sides of the box body is fixedly connected with a charging wire, and a buzzer is arranged on the right side of the top side of the box body. The invention achieves the advantages of collision prevention by arranging a buzzer, a first buffer plate, a first slide plate, a first spring, a first inflatable air bag, a first infrared sensor, a second buffer plate, a second slide plate, a second spring, a second inflatable air bag, a second infrared sensor, a first slide groove, a first slide block, a second slide groove and a second slide block to cooperate with each other, solving the problem that the existing new energy charging pile does not have the function of anti-collision and is easy to cause the damage of the new energy charging pile and preventing the damage of the new energy charging pile when the new energy vehicle collides with the new energy charging pile, and prolonging the service life of the new energy charging pile.