Diverse antibiotic compounds are abundant in microbial habitats undergoing recurrent wet-dry cycles, such as soil, root and leaf surfaces, and the built environment. These antibiotics play a central role in microbial warfare and competition, thus affecting population dynamics and the composition of natural microbial communities. Yet, the impact of wet-dry cycles on bacterial response to antibiotics has been scarcely explored. Using the bacterium E. coli as a model organism, we show through a combination of experiments and computational modeling, that wet-dry cycles protect bacteria from beta-lactams. This is due to the combined effect of several mechanisms including tolerance induced by high salt concentrations and slow cell-growth, which are inherently associated with microscopic surface wetness-a hydration state typical to `dry' periods. Moreover, we find evidence for a cross-protection effect, where lethal doses of antibiotic considerably increase bacterial survival during the dry periods. This work focuses on beta-lactams, yet similar protection was observed for additional major antibiotic classes. Our findings shed new light on how we understand bacterial response to antibiotics, with broad implications for population dynamics, interspecies interactions, and the evolution of antibiotic resistance in vast terrestrial microbial habitats.