The invention, which belongs to the technical field of hydraulic control, relates to an electrohydraulic gyrator. The electrohydraulic gyrator comprises a motor and an oil storage tank, a gear pump is arranged in the oil storage tank, and is connected with the motor through a coupling, the other end of the gear pump is connected with a hydraulic manifold block, the upper part of the oil storage tank is provided with an air filter, the electrohydraulic gyrator also comprises a rotary gear, an oil cylinder, a piston and a rack, and the oil storage tank is a cylinder. Since the oil storage tank of the electrohydraulic gyrator is modified into the cylinder, the cylinder does not need to be welded, only the joints between the cylinder and the surrounding parts need to be welded, consequently, the welding area is reduced compared with the old product, and thereby the problems of the electrohydraulic gyrator, including difficult welding and easy oil leakage, are effectively solved.