Capillarity-driven transport in nanoporous solids is widespread in nature and crucial for modern liquid-infused engineering materials. During imbibition, curved menisci driven by high negative Laplace pressures exert an enormous contractile load on the porous matrix. Due to the challenge of simultaneously monitoring imbibition and deformation with high spatial resolution, the resulting coupling of solid elasticity to liquid capillarity has remained largely unexplored. Here, we study water imbibition in mesoporous silica using optical imaging, gravimetry, and high-resolution dilatometry. In contrast to an expected Laplace pressure-induced contraction, we find a square-root-of-time expansion and an additional abrupt length increase when the menisci reach the top surface. The final expansion is absent when we stop the imbibition front inside the porous medium in a dynamic imbibition-evaporation equilibrium, as is typical for transpiration-driven hydraulic transport in plants, especially in trees. These peculiar deformation behaviors are validated by single-nanopore molecular dynamics simulations and described by a continuum model that highlights the importance of expansive surface stresses at the pore walls (Bangham effect) and the buildup or release of contractile Laplace pressures as menisci collectively advance, arrest, or disappear. Our model suggests that these observations apply to any imbibition process in nanopores, regardless of the liquid/solid combination, and that the Laplace contribution upon imbibition is precisely half that of vapor sorption, due to the linear pressure drop associated with viscous flow. Thus, simple deformation measurements can be used to quantify surface stresses and Laplace pressures or transport in a wide variety of natural and artificial porous media.