Xylan is one of the main non‐starch polysaccharides (NSPs) in cottonseed meal. This study aimed to evaluate the anti‐nutrition effect of xylan and to better understand cottonseed meal as a feed ingredient for the Chinese mitten crab, Eriocheir sinensis. A diet containing 280 g/kg fishmeal without cottonseed meal or xylan was formulated as a control (FM diet). A second diet (XYL diet) was supplemented with 53.3 g/kg xylan according to its amount in the third diet, the cottonseed meal diet (CSM diet), which was formulated to include 400 g/kg cottonseed meal. The last diet (CSM + XYLase diet) included 400 g/kg xylanase hydrolysed cottonseed meal, in which most xylan was hydrolysed. Diets were isonitrogenous (370 g/kg crude protein) and isoenergetic (17.58 KJ/g) and were randomly fed to 12 tanks of crabs for 8 weeks. Results showed that no difference was detected among groups in growth performance, serum biochemical index, or digestive and metabolism enzyme activity (p > 0.05). The apparent digestibility coefficient (ADC) of dry matter was FM > XYL > CSM + XYLase > CSM (p < 0.05). The ADC of protein in crab fed diet FM and XYL was significantly higher than CSM and CSM + XYLase (p < 0.05). Cottonseed meal decreased the fold height of the hindgut, upregulated the expression of peritrophin genes of Es‐PL44 and Es‐PP1 (p < 0.05), while xylan decreased the fold height of the hindgut and upregulated the expression of Es‐PP1 (p < 0.05). These results indicated that the negative effect of cottonseed meal and xylan on digestibility partly compensated by enhanced absorption of the hindgut innerly and by supplementation of xylanase externally, and cottonseed meal is an attractive alternative protein source in general for Chinese mitten crab.