The disclosure relates to ankle foot orthosis including foot plate, lower leg piece, first and second connecting parts, and pin. The first connecting part is connected to the foot plate, the second connecting part is connected to the lower leg piece, the first connecting part has an engagement portion, the second connecting part has a groove and an opening connected to the groove, the first connecting part is pivotably engaged with the second connecting part, the pin is detachably disposed on the first connecting part of the first pivoting mechanism, and the second connecting part has a first stopper and a second stopper spaced apart from each other. The first pivoting mechanism has a first detachable state; when the first pivoting mechanism is in first detachable state, the engagement portion is located at the opening and is detachable from the groove via the opening.