To achieve optimal recovery and value-added utilisation of cellulose in peanut shells, the cellulose in peanut shells was first extracted using the sodium hydroxide-sodium chlorite method. Then, cellulose hydrogel was prepared by graft copolymerisation using N, N’-methylenebisacrylamide as the cross-linking agent, sodium persulfate as the initiator, and acrylic acid as the monomer. Orthogonal optimisation experiments were designed to obtain optimal process parameters for hydrogel preparation with the cellulose dosage of 0.40 g, initiator dosage of 0.20 g, polymerisation temperature of 70°C, cross-linking agent of 0.25 g, and monomer dosage of 3.0 mL. The effect of initiator dosage on hydrogel synthesis was the most significant, followed by monomer dosage and reaction temperature. Characterisation using X-ray diffraction analysis and scanning electron microscopy revealed that the hydrogel was amorphous and exhibited a distinct three-dimensional double network structure. Hydrogel swelling kinetic analysis showed that the hydrogel swelling process was divided into three stages, and fitted the Schott secondary swelling kinetic model. The prepared hydrogel had a good adsorption effect on methylene blue; the adsorption of methylene blue by the hydrogel was 1.259 mg/g at 25°C when the initial concentration of methylene blue was 5 mg/L. The adsorption kinetics of the hydrogel fit the pseudo-first-order kinetic model, pseudo-second-order kinetic model, Eovich model and particle diffusion model. The best fitting effect was obtained with the pseudo-second-order kinetic model. The adsorption isotherm analysis of methylene blue on hydrogel showed that the adsorption process was consistent with Langmuir and Freundlich models. The correlation coefficient of the Freundlich isotherm model was higher, indicating that the adsorption of methylene blue on hydrogel was mainly chemisorption.