Antibiotics residues in aqueous environment and sewage sludge accumulation have become serious environmental issues. The aim of this study is to investigate the potential of ciprofloxacin (CIP) removal by sludge-based biochar prepared from co-pyrolysis of sewage sludge and bamboo waste (BW). The stability and environmental risk of heavy metals (HMs) in the biochar were further investigated to evaluate potential risks for biochar utilization. Results showed that BW was an outstanding additive to prepare co-pyrolyzed biochar from sludge. A higher CIP removal rate (95%) of BW-sludge biochar (SBC) was obtained under initial CIP concentration of 10 mg/L, and its maximum adsorption capacity was 62.48 mg/g which was calculated from the Langmuir model. The pseudo-second-order and Freundlich model also well fit the CIP adsorption process, indicating a chemical and multilayer adsorption of CIP on a heterogeneous surface of biochar. Adsorption mechanism analysis indicated that the diverse functional groups and Fe species in biochar probably were the dominant factors in the adsorption of CIP. The π-π interaction, H–bond, ion exchange, and Fe-complexation might be the main interactions between the functional species and CIP molecules. Besides, HMs, especially the Cr, Cd, and As, were well immobilized in SBC compared with pure sludge biochar. This work suggested that sludge-based biochar, especially the co-pyrolyzed SBC, could be a potential adsorbent for CIP removal from aqueous solutions.