A header lift assembly for an agricultural harvester includes a lift cylinder and a lock assembly. The lift cylinder includes a sleeve and a piston, and the piston is configured to move in an axial direction relative to the sleeve. The lock assembly is coupled to the lift cylinder and is configured to automatically transition to a first locking position upon extension of the piston in the axial direction to a locking distance from the sleeve. The first locking position is configured to block retraction of the piston in the axial direction beyond a first distance from the sleeve. The lock assembly is also configured to automatically disengage from the first locking position to a unlocked position that facilitates retraction of the piston beyond the first distance upon extension of the piston to an unlocking distance.