The properties of wood depend strongly on its water content, but the physicochemical basis for the interaction of water with cell wall components is poorly understood. Due to the importance of the problem both in the context of wood technology and the biological function of swelling and dehydration for growth stresses and seed dispersal, a wealth of descriptive data has been accumulated but a microscopic theory of water-biomolecular interactions is missing. We develop here, at a primitive level, a minimal parameter-free, coarse-grained, model of wood secondary cell walls to predict water absorption, in the form of an equation of state. It includes for the first time all threemechanical, colloidal and chemical-contributions, taking into account the cell walls microstructure. The hydration force around the elongated cellulose crystals and entropy of mixing of the matrix polymers (hemicelluloses and lignin) are the dominant contributions driving the swelling. The elastic energy needed to swell the composite is the main term opposing water uptake. Hysteresis is not predicted but water uptake versus humidity, is reproduced in a large temperature range. Within this framework, the origin of wood dissolution and different effects of wood treatments on water sorption can be understood at the molecular level.