This study endeavors to optimize the resource utilization of waste sludge while mitigating environmental risks associated with Pb2+ contamination. Tartaric acid was used as an activator in the production of modified biochar (MBC-TA, PBC-TA) extracted from municipal and pharmaceutical sludge as a means to enhance the functional groups on the surface of the biochar and enhance its adsorption properties. The research systematically examined various influential factors affecting adsorption, namely adsorbent dosage, reaction time, and pH. The physicochemical properties of the biochar were evaluated utilizing scanning electron microscopy (SEM), Fourier-transform infrared spectroscopy (FTIR), X-ray diffraction (XRD) analysis, and point of zero charge (pHPZC) analysis. The results revealed that modifications in surface functional groups significantly impacted the adsorption efficiency. The adsorption kinetic model showed that the adsorption of Pb2+ by the two modified sludge-derived biochar was more consistent with the pseudo-secondary kinetic model, and the adsorption was mainly chemisorption. The adsorption isotherm models were fitted and analyzed, and it was found that the Langmuir models of the two adsorbents were more consistent with the adsorption behavior, the adsorption mainly relied on monomolecular layer adsorption, and the adsorption capacity of tartaric acid-modified MBC-TA and PBC-TA were increased by 22.58 mg/g and 22.86 mg/g, respectively. This finding underscores the efficacy of tartaric acid modification in augmenting the pollutant removal capabilities of the materials.