A header lift assembly for an agricultural harvester (10) includes a lift cylinder and a lock assembly (34). The lift cylinder includes a sleeve (22) and a piston (24), and the piston is configured to move in an axial direction (28) relative to the sleeve (22). The lock assembly (34) is coupled to the lift cylinder and is configured to automatically transition to a first locking position (64) upon extension of the piston (24) in the axial direction (28) to a locking distance (60) from the sleeve (22). The first locking position (64) is configured to block retraction of the piston (24) in the axial direction (28) beyond a first distance (66) from the sleeve (22). The lock assembly (34) is also configured to automatically disengage from the first locking position (64) to a unlocked position (100) that facilitates retraction of the piston (24) beyond the first distance (66) upon extension of the piston (24) to an unlocking distance (72).