Porous SiOC composites for efficient treatment of dye wastewater were prepared using polysiloxane preceramic polymer mixed with wood biomass by pyrolysis under Ar atmosphere. The influences of the pyrolysis temperature on the microstructure, pore feature and adsorption behavior were investigated. The composites contain the α-quartz, cristobalite, nanosized β-SiC and free carbon embedded in a SiOC matrix. The composite obtained at 1300 °C presents a high specific surface area up to 463 m2/g. The adsorption capacity is enhanced by increasing pyrolysis temperature. The adsorption for the removal of methylene blue on the composites follows the pseudo second-order kinetics, and the adsorption data can be described by the Langmuir and Freundlich adsorption isotherms very well. The composite at 1300 °C displays a maximum adsorption capacity up to 173.5 mg/g caused by the enhancement of specific surface area and the existence of sp2 carbons, resulting in many favorable adsorption sites and strong electrostatic attraction.