Exploitation of plant lignocellulosic biomass is hampered by our ignorance of the molecular basis for its properties such as strength and digestibility. Xylan, the most prevalent non-cellulosic polysaccharide, binds to cellulose microfibrils. The nature of this interaction remains unclear, despite its importance. Here we show that the majority of xylan, which forms a threefold helical screw in solution, flattens into a twofold helical screw ribbon to bind intimately to cellulose microfibrils in the cell wall. 13C solid-state magic-angle spinning (MAS) nuclear magnetic resonance (NMR) spectroscopy, supported by in silico predictions of chemical shifts, shows both two- and threefold screw xylan conformations are present in fresh Arabidopsis stems. The twofold screw xylan is spatially close to cellulose, and has similar rigidity to the cellulose microfibrils, but reverts to the threefold screw conformation in the cellulose-deficient irx3 mutant. The discovery that induced polysaccharide conformation underlies cell wall assembly provides new principles to understand biomass properties.