With the development of dye production and the printing/dyeing industry, the discharge of dyestuff wastewater has sharply increased, posing a threat to the health of organisms. Therefore, it is necessary to develop efficient adsorbent materials to remove dyes. Porous BCNO (pBCNO) was prepared via pyrolysis of melamine borate modified by hydroxyethyl cellulose (HEC). Compared to traditionally pyrolytic melamine borate, the incorporation of HEC can not only alter the product's microstructure, but also significantly adjust its bonding and chemical composition. Specifically, the specific surface area and total pore volume of pBCNO are as high as 1102.4 m2/g and 0.55 cm3/g, respectively. The generation of B-N, C-B, C-O, N-C and B-O bonds enriches the bonding and chemical activity of pBCNO. Encouraged by these unique microstructures and chemical compositions, pBCNO exhibits excellent methylene blue (MB) adsorption and recycling capabilities, showing a maximum adsorption capacity and removal efficiency of 709.5 mg/g and 99.9 %, respectively. The adsorption behavior is dominated by chemical adsorption, following Langmuir adsorption theory and pseudo-second-order model. This study not only provides a new synthesis route to pBCNO, but also establishes an experimental and theoretical foundation for the practical adsorption of pBCNO toward organic pollutants in industrial effluent.