The invention discloses a variable length connecting rod with a hydraulic mechanism. The inside of the connecting rod body is a cavity, the cavity leads to a connecting rod small end and has a pistonpipeline, the piston pipeline is internally equipped with a piston rod, a piston body moves in the cavity, the connecting rod small end is internally equipped with a rolling shaft, the rolling shaft has an eccentric pin inside, one roller shaft position facing the piston pipeline is equipped with an arc-shaped sliding chute body, one piston rod end facing the rolling shaft is equipped with a cylindrical pin, the cylindrical pin is located in the sliding chute body, the rolling shaft rotates to drive the piston rod to move, the connecting rod is also internally equipped with a first oil duct and a second oil duct. Compared with the prior art, the variable length connecting rod with a hydraulic mechanism provided by the invention has the characteristics of simple structure and high feasibility, realizes two-stage variable high-low compression ratio, not only can improve the partial load thermal efficiency of a gasoline engine, but also can avoid detonation under a heavy load, and effectively improves the reliability and economical efficiency of the engine.