Rapeseed straw, bagasse, and walnut peel have a large amount of resource reserves, but there are few technologies for high value-added utilization. In the research of biochar, walnut green husk is rarely used as raw material. In addition, the three main components of biomass (lignin, cellulose, and hemicellulose) are present in similar proportions, and the differences between the physical and chemical properties of biochar prepared with similar amounts of biomass raw materials are not clear. Using three kinds of biomass of the same quality as raw materials, biochar was prepared via pyrolysis at 400 \& DEG;C, and activated carbon was prepared via CO2 activation at 800 \& DEG;C. The results showed that the pore numbers of the three kinds of biochar increased after activation, resulting in the increase of the specific surface area. The resulting numbers were 352.99 m2/g for sugarcane bagasse biochar (SBB)-CO2, 215.04 m2/g for rapeseed straw biochar (RSB)-CO2, and 15.53 m2/g for walnut green husk biochar (WGB)-CO2. Ash increased the amount of carbon formation, but a large amount of ash caused biochar to form a perforated structure and decreased the specific surface area (e.g., WGB), which affected adsorption ability. When the three main components were present in similar proportions, a high content of cellulose and lignin was beneficial to the preparation of biochar. The adsorption value of MB by biochar decreased with the increase of biomass ash content. After activation, the maximum adsorption value of MB for bagasse biochar was 178.17 mg/g, rapeseed straw biochar was 119.25 mg/g, and walnut peel biochar was 85.92 mg/g when the concentration of methene blue solution was 300 mg/L and the biochar input was 0.1 g/100 mL at room temperature. The adsorption of MB by biochar in solution occurs simultaneously with physical adsorption and chemical adsorption, with chemical adsorption being dominant. The optimal MB adsorption by SBB-CO2 was dominated by multimolecular-layer adsorption. This experiment provides a theoretical basis for the preparation of biochar and research on its applications in the future.