A new magnetic adsorbent pellets(MP) was prepared with electric flocculation sludge as raw material by technologies of alkaline impregnation, heat activation and composition with vermiculite. Its decolorization performance for treating methylene blue (MB) dye wastewater is studied, and its structure was analyzed by FTIR, XRD, SEM, XPS, BET and magnetic hysteresis curve. The results showed that the best prepare condition of MP is that impregnation time of 15 % KOH solution is 48 h and a subsequent calcination at 600 °C for 60 min, m(vermiculite)/m(sludge)=1.0. Characterization analysis illustrates that the activated sludge and vermiculite has been successfully composited. And the organic waste in sludge is converted into activated carbon and the iron species are transformed into Fe3O4. It has mesoporous structure and magnetic property and can be separated from the solution by an external magnetic field. In addition, MP was effective on treating MB wastewater, the decoloration is 85 % at the dosage of 10 g L−1 when the contact time is 84 h and the initial concentration of dye is 10 mg L−1 and 20 mg L−1. The sludge utilization technology investigated in this work is a new process which could reduce the emission, protect the environment and yield the useful by‐product.