The invention discloses a buffer mechanism based on a pilot overflow valve. The buffer mechanism comprises a piston rod, an air piston cylinder, a return spring, the pilot overflow valve and a fast reset one-way valve, wherein the main structures are the piston rod, the piston cylinder and the return spring, the auxiliary structures are the overflow valve and the one-way valve. When the impact acts on the piston rod, an air cavity is compressed, at the moment, the one-way valve is closed, air flows to the pilot overflow valve through a pipeline, the pressure of a valve element and the pressureof a damping hole can be adjusted through two adjusting knobs, then the gas flowing speed of the overflow valve can be adjusted, then the buffer pressure and time of the buffer can be adjusted, the gas is returned to the atmosphere through a silencer, when the impact is stopped, the return spring works, the pressure of the air cavity is enabled to be reduced to be less than the atmospheric pressure, at the moment, the one-way valve works, the air rapidly fills the air cavity through a filter, and then the buffer is enabled to be reset; and two air valves are embedded in a machine frame, so that assembly, disassembly and maintenance are convenient.