Herein, the hierarchically processed pineapple peel was achieved by water (WT-PP), alkali (AT-PP), bleaching (BT-PP) and bleaching-alkali (PPC) treatments respectively for separate or simultaneous removal of hemicellulose and lignin. These treated pineapple peel were further fabricated into hydrogels (WT-PPH, AT-PPH, BT-PPH and PPCH, respectively) by a facile dissolution-regeneration process in ionic liquid. The structure and Congo red (CR) adsorption ability of the hydrogels were investigated and compared. The adsorption process conformed better to the pseudo-second-order kinetic and Langmuir isotherm models. The maximum adsorption capacity was 114.94 mg/g for WT-PPH, 77.52 mg/g for AT-PPH, 138.89 mg/g for BT-PPH and 75.19 mg/g for PPCH, implying the separate bleaching treatment could improve the CR adsorption capacity more. Moreover, the hydrogels displayed a pH-dependent behavior and good reusability during adsorption process. Based on removal of initial components and simple preparation method, this work would be beneficial for the development of agricultural residues-based biosorbents.