Mechanical testing and gait measurement for ankle-foot orthosis (AFO) are crucial for determining the AFO stiffness magnitude in an individual. However, information on the effect of the stiffness magnitude on the muscle force during gait is limited. This study aimed to investigate the relationship between the AFO stiffness and ankle muscle force during gait. The AFO stiffness was mechanically tested using a sixaxis robot arm. The stiffness magnitude was adjusted using different spring constants. Five stiffness conditions were set for each plantarflexion resistive (PFR) and dorsiflexion resistive (DFR) function. The effect of the PFR and DFR on the ankle muscle force during gait were determined using musculoskeletal and AFO models. Tibialis anterior (TA) and triceps surae (TS) muscle forces were calculated through gait simulation. The angle-moment relationships display hysteresis loops for each condition. One of the PFR and DFR conditions differed significantly from the others (for all, p < 0.05). In order of lower stiffness, the each PFR contribution ratio to the peak TA muscle force normalized in the no-stiffness condition was 8.4%, 10.8%, 11.3%, 13.5%, and 15.3%; while the each DFR contribution ratio to the peak TS muscle force was 16.2%, 20.9%, 25.3%, 29.8%, and 30.5%, respectively. Through mechanical testing as well as gait simulation, it was demonstrated that the magnitude of the AFO stiffness decreased the required ankle muscle force during gait. This study can contribute to more effective gait rehabilitation using AFO as well as AFO fabrication with customized stiffness for individual gait function.