The invention relates to an energy-saving hydraulic oil pumping unit with adjustable stroke used in oil field, comprising frame, gear group, hydraulic transmission mechanism, rack, head sheave, suspended-weight rope and oil pumping bar. Two frames are set at two sides of hydraulic transmission mechanism symmetrically. A gear group and two head sheaves are set on each frame. Two gear groups are mated with racks set at two ends of hydraulic transmission mechanism respectively. The gear group draws the oil pumping bar through the suspended-weight rope and the head sheave. Thereinto, the hydraulic transmission mechanism comprises communicating vessel, piston and hydraulic pump. A hydraulic pump is fixed in the communicating vessel and two pistons are set in cavities at two ends of communicating vessel respectively. Driving liquid is poured between two pistons in cavities of communicating vessel. The invention is provided with simple structure, scientific and reasonable design, adjustable stroke and punching time, convenient maintenance, dismounting and use, safe operation, high liquid production volume, little energy consumption and low operating cost. It is also provided with higher innovation.