Since the 1970s, the sudden, rapid collapse of 20% of ice shelves on the Antarctic Peninsula has led to large-scale thinning and acceleration of its tributary glaciers. The leading hypothesis for the collapse of most of these ice shelves is the process of hydrofracturing, whereby a water-filled crevasse is opened by the hydrostatic pressure acting at the crevasse tip. This process has been linked to observed atmospheric warming through the increased supply of meltwater. Importantly, the low-density firn layer near the ice-shelf surface, providing a porous medium in which meltwater can percolate and refreeze, has to be filled in with refrozen meltwater first, before hydrofracturing can occur at all. Here we build upon this notion of firn air depletion as a precursor of ice-shelf collapse, by using a firn model to show that pore space was depleted in the firn layer on former ice shelves, which enabled their collapse due to hydrofracturing. Two climate scenario runs with the same model indicate that during the 21st century most Antarctic Peninsula ice shelves, and some minor ice shelves elsewhere, are more likely to become susceptible to collapse following firn air depletion. If warming continues into the 22nd century, similar depletion will become widespread on ice shelves around East Antarctica. Our model further suggests that a projected increase in snowfall will protect the Ross and Filchner–Ronne Ice Shelves from hydrofracturing in the coming two centuries.