The fossorial life-history emerged as a response to hostile environmental conditions, such as extreme temperatures and dryness. It evolved independently in different lineages of amphibians, which are particularly vulnerable to dehydration and require a continuous level of humidity because of their permeable skin. For the first time, we test the hypothesis that amphibians are able to adapt their fossorial behaviour to substrate humidity, using the Pacific horned frogs (Ceratophrys stolzmanni) from the Ecuadorian dry forest as a model. When exposed to dry substrate, the animals burrowed much deeper than the ones in wet soil. The capacity to excavate was particularly high in this species: frogs from the dry treatment could be found at more than onemeter depth after just a few hours. Our results reveal a conditional strategy that contributes to explain the persistence of amphibians in dry environments.