Pyrolysis of sewage sludge to obtain biochar is an environmentally friendly method of sewage sludge utilization. In this study, sewage sludge and walnut shell were co-pyrolyzed to produce biochar, which was utilized in the adsorption of ammonium and phosphate from water. Brunauer–Emmett–Teller analysis, X-ray diffraction spectroscopy, scanning electron microscopy, and Fourier transform infrared techniques were applied to analyze the physical and chemical properties of the biochar. The sewage sludge-based biochar consisted of rich metal oxides and functional groups, and the addition of walnut shell was beneficial for the development of porous structure. When the mixing ratio of sewage sludge and walnut shell was 3:1, the derived biochar (MBC3-1) showed a high adsorption capacity for NH4+ in neutral or weak alkaline water. Pure sewage sludge biochar (SBC) was the best option for the adsorption of PO43− in a wide pH range of water. The adsorption of NH4+ and v on MBC3-1 and SBC were controlled by intraparticle diffusion and pseudo-second-order kinetic models, respectively. Isothermal studies indicated that multiple adsorption processes occurred in the adsorption of NH4+ and PO43−, and the maximum adsorption capacity of NH4+ and PO43− reached 22.85 mg/g and 303.49 mg/g on MBC3-1 and SBC, respectively. Thermodynamic analysis confirmed the exothermic and endothermic nature for NH4+ and PO43− adsorption on biochar, respectively.