The development of low-cost adsorbent is an urgent need in the field of wastewater treatment. In this study, sludge-based magnetic biochar (SMB) was prepared by pyrolysis of sewage sludge and backwashing iron mud without any chemical agents. The samples were characterized by TGA, XRD, ICP, Organic element analysis, SEM, TEM, VSM and BET. Characterization analysis indicated that the magnetic substance in SMB was Fe3O4, and the saturation magnetization was 25.60 emu·g−1, after the adsorption experiment, SMB could be separated from the solution by a magnet. The batch adsorption experiment of methylene blue (MB) adsorption showed that the adsorption capacities of SMB at 298 K, 308 K and 318 K were 47.44 mg·L−1, 39.35 mg·L−1, and 25.85 mg·L−1, respectively. After one regeneration with hydrochloric acid, the maximum adsorption capacity of the product reached 296.52 mg·g−1. Besides, the adsorption kinetic described well by the pseudo-second order model revealed that the intraparticle diffusion was not just the only rate controlling step in adsorption process. This study gives a reasonable reference for the treatment of sewage sludge and backwashing iron mud. The product could be used as a low-cost adsorbent for MB removal.