Abstract text: Land plants have evolved xylem vessels with reinforced wall structures to conduct water and nutrients. Vessel pits with 3D cavities are key determinants of plant hydraulic efficiency and growth plasticity, yet their ultrastructure and formation mechanisms remain unclear. Here, we reveal the nanoscale 3D structure of vessel pits using volume electron microscopy and outline the molecular pathway governing pit shaping to ensure xylem robustness and enhance grain yield in rice. Through a genome-wide association study, we identified a QTL for pit size control (PS1), which encodes a deacetylase that precisely controls pit geometry through xylan deacetylation at pit borders. An elite PS1 variant could modify xylans into a hypoacetylated form, promoting their binding to cellulose and maintaining wall integrity. Furthermore, we found that nitrogen could regulate pit size through PS1 under the control of MYB61, a QTL gene of nitrogen utilization efficiency. Pyramiding the elite alleles of PS1 and MYB61 could further optimize pit geometry and thereby significantly increase grain yield in rice. Our findings reveal a “quality control” mechanism for pit shaping that boost xylem robustness and crop yield, offering a promising strategy for sustainable agriculture.