Understanding how human ankle mechanics are modulated during interaction with a wide range of environments is essential to develop reliable and robust lower extremity robots such as prosthetics and exoskeletons that mimic the behavior of the human ankle. This paper investigates the effect of mechanical environment on the modulation of human ankle stiffness and its underlying mechanisms. A novel multi-axis robotic platform, capable of actuating the ankle in both dorsiflexion-plantarflexion (DP) and inversion-eversion (IE), was used to quantify ankle stiffness in 2 degrees-of-freedom, while human subjects maintain upright posture in a range of stiffness-defined haptic environments. Ankle stiffness in DP increased with increasing compliance of haptic environment, but it was significantly lower than the stiffness measured in a rigid mechanical environment. On the other hand, ankle stiffness in IE was relatively constant in both compliant and rigid environments. Analysis of muscle activation and center of pressure of the ground reaction force provided an explanation for the underlying mechanisms of these observations. Notably, the analysis confirmed that modulation of ankle stiffness cannot be solely explained by activation of superficial ankle muscles. Implications for the design and control of lower extremity robots mimicking human ankle impedance are discussed.