The invention provides a free piston engine, which comprises a cylinder block, a compression accumulator, a pump station and a piston assembly, and also comprises a first proportional overflow valve, a proportional pressure reducing valve, a proportional velocity regulating valve and a pressure sensor; a piston chamber in the cylinder block is divided into a combustion chamber, an air intake chamber, a balance chamber, a pump chamber and a compression chamber by the piston assembly. As a pipeline connected with two inlets of a compression main port and a compression starting port of the compression chamber and the compression accumulator is provided with the proportional pressure reducing valve, the proportional velocity regulating valve, a reversing valve, the proportional overflow valve and the pressure sensor, according to the detection signal of the pressure sensor connected with the compression accumulator, the reversing valve is switched between the compression accumulator and an oil supply accumulator, and therefore oil supply work on high and low-pressure two oil lines is completed by utilizing one hydraulic pump station; moreover, after hydraulic oil in the compression accumulator flows through the proportional pressure reducing valve, stable pressure can be obtained and supplied for the compression chamber, so that the pressure of the inlet of the compression chamber is stable.