ABSTRACT Gait adjusting is an effective way to solve leg failure problems and is also the foundation of intelligent self-adjustment. This paper takes a hexagonal type of robot as a prototype and proposes a ‘2-2-1’ gait grouping and gait sequence for the one leg failure case based on the ‘4 + 2’ gait. The longitudinal stability margin is used to evaluate the FLF-A and FLF-B gaits with left front leg failure and FLM-A and FLM-B gait with left middle leg failure. The foothold positions are adjusted by changing the median angle of the stance phase of the body-coxa joint in each leg in order to make sure the centre of gravity is in a stable support polygon. The experiments of the robot walking show that the FLF-A gait and the FLM-B gait are more stable than the FLF-B and FLM-A after adjustment. The pitch and roll angles are maintained within − 3° to 3°, which verify the effectiveness of the stance phase leg median position adjustment strategy. This study could be used to do forward pre-adjustment in the case of one leg failure.