The utility model belongs to the technical field of oil cylinders, and particularly relates to a mechanical locking oil cylinder which comprises a cylinder body, a locking cavity is formed in the cylinder body, a
locking mechanism is installed in the locking cavity, the
locking mechanism comprises a matching round block, a matching rod is fixedly installed on the matching round block, a
steel ball is installed on the matching rod in a sliding mode, and the
steel ball is arranged on the matching rod. When hydraulic oil is introduced into the oil inlet
pipe, the
steel ball is propped open so as to enter the left side of the sliding cavity to prop out the
piston rod, and when hydraulic oil is stopped from being introduced from the oil inlet
pipe, under the action of the spring, the
piston rod is locked by the locking
piston. The steel ball is pressed against the second L-shaped cavity, so that the function of locking the
piston rod is achieved, after hydraulic oil is introduced from the oil return
pipe, the hydraulic oil presses the locking piston out of the matching cavity, so that the steel ball is pressed away, so that locking of the
piston rod is unlocked, the design structure is simple, and the automatic locking function is achieved.